Skip to content

Commit 6e0ca34

Browse files
committed
feat: add nvidia-cuda feature
1 parent e42ae94 commit 6e0ca34

13 files changed

Lines changed: 450 additions & 1 deletion

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"features": {
1616
"ghcr.io/devcontainers/features/go:1.3.2": {
17-
"version": "1.24.5"
17+
"version": "1.24.7"
1818
},
1919
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
2020
"ghcr.io/devcontainers-extra/features/devcontainers-cli:1": {}

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
"mingw",
3434
"nginx",
3535
"node",
36+
"nvidia-cuda",
3637
"playwright-deps",
3738
"python",
3839
"rust",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Below is a list with included features, click on the link for more details.
3333
| [mingw](./features/src/mingw/README.md) | Installs MinGW. |
3434
| [nginx](./features/src/nginx/README.md) | Installs Nginx. |
3535
| [node](./features/src/node/README.md) | Installs Node.js. |
36+
| [nvidia-cuda](./features/src/nvidia-cuda/README.md) | A package which installs NVIDIA CUDA. |
3637
| [playwright-deps](./features/src/playwright-deps/README.md) | Installs all dependencies required to run Playwright. |
3738
| [python](./features/src/python/README.md) | Installs Python. |
3839
| [rust](./features/src/rust/README.md) | A package which installs Rust, common Rust utilities and their required dependencies. |

build/build.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ func init() {
170170
gotaskr.Task("Feature:node:Test", func() error { return testFeature("node") })
171171
gotaskr.Task("Feature:node:Publish", func() error { return publishFeature("node") })
172172

173+
////////// nvidia-cuda
174+
gotaskr.Task("Feature:nvidia-cuda:Package", func() error { return packageFeature("nvidia-cuda") })
175+
gotaskr.Task("Feature:nvidia-cuda:Test", func() error { return testFeature("nvidia-cuda") })
176+
gotaskr.Task("Feature:nvidia-cuda:Publish", func() error { return publishFeature("nvidia-cuda") })
177+
173178
////////// playwright-deps
174179
gotaskr.Task("Feature:playwright-deps:Package", func() error { return packageFeature("playwright-deps") })
175180
gotaskr.Task("Feature:playwright-deps:Test", func() error { return testFeature("playwright-deps") })

features/src/nvidia-cuda/NOTES.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Notes
2+
3+
### System Compatibility
4+
5+
> Only amd64 is supported
6+
7+
Debian, Ubuntu
8+
9+
### Accessed Urls
10+
11+
Needs access to the following URL for downloading and resolving:
12+
* https://developer.download.nvidia.com
13+
14+
### Install the NVIDIA Container Toolkit
15+
16+
Follow [NVIDIA's instructions to install the NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/overview.html) on your host machine. The NVIDIA Container Toolkit is available on a variety of Linux distributions. Make sure you have [installed the NVIDIA driver](https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/index.html) for your Linux distribution before installing the NVIDIA Container Toolkit.
17+
18+
### Package Dependency Tree
19+
20+
Here is a list of the dependency tree of the packages in case you want to install only some of them.
21+
22+
cuda-toolkit
23+
- cuda-compiler
24+
- cuda-cuobjdump
25+
- cuda-cuxxfilt
26+
- cuda-nvcc
27+
- cuda-nvprune
28+
- cuda-libraries
29+
- libnpp
30+
- cuda-libraries-dev
31+
- cuda-tools
32+
- cuda-command-line-tools
33+
- cuda-nvtx
34+
- cuda-visual-tools
35+
- gds-tools
36+
- cuda-documentation
37+
- cuda-nvml-dev
38+
39+
### NVIDIA cuDNN
40+
41+
TODO: This is not yet supported
42+
43+
* libcudnn8 - cuDNN runtime libraries
44+
* libcudnn8-dev - cuDNN development libraries and headers
45+
* libcudnn9-cuda-11 - cuDNN runtime libraries for CUDA 11.8
46+
* libcudnn9-dev-cuda-11 - cuDNN development headers and symlinks for CUDA 11.8
47+
* libcudnn9-cuda-12 - cuDNN runtime libraries for CUDA 12.4
48+
* libcudnn9-dev-cuda-12 - cuDNN development headers and symlinks for CUDA 12.4

features/src/nvidia-cuda/README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# NVIDIA CUDA (nvidia-cuda)
2+
3+
A package which installs NVIDIA CUDA.
4+
5+
## Example Usage
6+
7+
```json
8+
"features": {
9+
"ghcr.io/postfinance/devcontainer-features/nvidia-cuda:0.1.0": {
10+
"version": "latest",
11+
"installLibraries": true,
12+
"installDevLibraries": true,
13+
"installCompiler": true,
14+
"installTools": true,
15+
"additionalCudaPackages": "",
16+
"downloadUrl": ""
17+
}
18+
}
19+
```
20+
21+
## Options
22+
23+
| Option | Description | Type | Default Value | Proposals |
24+
|-----|-----|-----|-----|-----|
25+
| version | The version of NVIDIA CUDA to install. | string | latest | latest, 12.3, 12.9 |
26+
| installLibraries | Installs all runtime CUDA Library packages. | boolean | true | true, false |
27+
| installDevLibraries | Installs all development CUDA Library packages. | boolean | true | true, false |
28+
| installCompiler | Installs all CUDA compiler packages. | boolean | true | true, false |
29+
| installTools | Installs all CUDA command line and visual tools. | boolean | true | true, false |
30+
| additionalCudaPackages | A comma-separated list of additional CUDA packages to install. Disable the other flags to have full control over what is installed. | string | <empty> | |
31+
| downloadUrl | The download URL to use for CUDA binaries. | string | <empty> | https://mycompany.com/artifactory/nvidia-cuda-generic-remote/ |
32+
33+
## Notes
34+
35+
### System Compatibility
36+
37+
> Only amd64 is supported
38+
39+
Debian, Ubuntu
40+
41+
### Accessed Urls
42+
43+
Needs access to the following URL for downloading and resolving:
44+
* https://developer.download.nvidia.com
45+
46+
### Install the NVIDIA Container Toolkit
47+
48+
Follow [NVIDIA's instructions to install the NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/overview.html) on your host machine. The NVIDIA Container Toolkit is available on a variety of Linux distributions. Make sure you have [installed the NVIDIA driver](https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/index.html) for your Linux distribution before installing the NVIDIA Container Toolkit.
49+
50+
### Package Dependency Tree
51+
52+
Here is a list of the dependency tree of the packages in case you want to install only some of them.
53+
54+
cuda-toolkit
55+
- cuda-compiler
56+
- cuda-cuobjdump
57+
- cuda-cuxxfilt
58+
- cuda-nvcc
59+
- cuda-nvprune
60+
- cuda-libraries
61+
- libnpp
62+
- cuda-libraries-dev
63+
- cuda-tools
64+
- cuda-command-line-tools
65+
- cuda-nvtx
66+
- cuda-visual-tools
67+
- gds-tools
68+
- cuda-documentation
69+
- cuda-nvml-dev
70+
71+
### NVIDIA cuDNN
72+
73+
TODO: This is not yet supported
74+
75+
* libcudnn8 - cuDNN runtime libraries
76+
* libcudnn8-dev - cuDNN development libraries and headers
77+
* libcudnn9-cuda-11 - cuDNN runtime libraries for CUDA 11.8
78+
* libcudnn9-dev-cuda-11 - cuDNN development headers and symlinks for CUDA 11.8
79+
* libcudnn9-cuda-12 - cuDNN runtime libraries for CUDA 12.4
80+
* libcudnn9-dev-cuda-12 - cuDNN development headers and symlinks for CUDA 12.4
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"id": "nvidia-cuda",
3+
"version": "0.1.0",
4+
"name": "NVIDIA CUDA",
5+
"description": "A package which installs NVIDIA CUDA.",
6+
"options": {
7+
"version": {
8+
"type": "string",
9+
"proposals": [
10+
"latest",
11+
"12.3",
12+
"12.9"
13+
],
14+
"default": "latest",
15+
"description": "The version of NVIDIA CUDA to install."
16+
},
17+
"installLibraries": {
18+
"type": "boolean",
19+
"default": true,
20+
"description": "Installs all runtime CUDA Library packages."
21+
},
22+
"installDevLibraries": {
23+
"type": "boolean",
24+
"default": true,
25+
"description": "Installs all development CUDA Library packages."
26+
},
27+
"installCompiler": {
28+
"type": "boolean",
29+
"default": true,
30+
"description": "Installs all CUDA compiler packages."
31+
},
32+
"installTools": {
33+
"type": "boolean",
34+
"default": true,
35+
"description": "Installs all CUDA command line and visual tools."
36+
},
37+
"additionalCudaPackages": {
38+
"type": "string",
39+
"default": "",
40+
"description": "A comma-separated list of additional CUDA packages to install. Disable the other flags to have full control over what is installed."
41+
},
42+
"downloadUrl": {
43+
"type": "string",
44+
"default": "",
45+
"proposals": [
46+
"https://mycompany.com/artifactory/nvidia-cuda-generic-remote/"
47+
],
48+
"description": "The download URL to use for CUDA binaries."
49+
}
50+
}
51+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
. ./functions.sh
2+
3+
"./installer_$(detect_arch)" \
4+
-version="${VERSION:-"latest"}" \
5+
-installLibraries="${INSTALLLIBRARIES:-"true"}" \
6+
-installDevLibraries="${INSTALLDEVLIBRARIES:-"true"}" \
7+
-installCompiler="${INSTALLCOMPILER:-"true"}" \
8+
-installTools="${INSTALLTOOLS:-"true"}" \
9+
-additionalCudaPackages="${ADDITIONALCUDAPACKAGES:-""}" \
10+
-downloadUrl="${DOWNLOADURL:-""}"

0 commit comments

Comments
 (0)