Skip to content

Commit 44c8da9

Browse files
committed
CUDA: Add MAX Dev Containers
- Do not install CUDA related stuff
1 parent 2061cdb commit 44c8da9

File tree

6 files changed

+422
-8
lines changed

6 files changed

+422
-8
lines changed

.devcontainer/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
!/conf/shell/var/tmp/
2323
!/conf/shell/var/tmp/snippets/
2424
!/cuda-julia-*/
25+
!/cuda-max-*/
2526
!/cuda-python-*/
2627
!/cuda-r-*/
2728
!/julia-*/
@@ -84,6 +85,7 @@
8485
!/conf/shell/etc/skel/.profile
8586
!/conf/shell/var/tmp/snippets/*.sh
8687
!/cuda-julia-*/devcontainer.json
88+
!/cuda-max-*/devcontainer.json
8789
!/cuda-python-*/devcontainer.json
8890
!/cuda-r-*/devcontainer.json
8991
!/julia-*/devcontainer.json

.devcontainer/Mojo.Dockerfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ RUN dpkgArch="$(dpkg --print-architecture)" \
6868
&& apt-get -y install --no-install-recommends --only-upgrade \
6969
ca-certificates \
7070
openssl \
71-
## Install CUDA related stuff
72-
&& if [ -n "${CUDA_VERSION}" ]; then \
73-
## Install command-line tools and nvcc
74-
CUDA_VERSION_MAJ_MIN_DASH=$(echo ${CUDA_VERSION%.*} | tr '.' '-'); \
75-
apt-get -y install --no-install-recommends \
76-
cuda-command-line-tools-${CUDA_VERSION_MAJ_MIN_DASH}=${NV_CUDA_LIB_VERSION} \
77-
cuda-nvcc-${CUDA_VERSION_MAJ_MIN_DASH}; \
78-
fi \
7971
## Install Python related stuff
8072
## Install JupyterLab
8173
&& pip install --no-cache-dir \
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"name": "CUDA MAX nightly base",
3+
"build": {
4+
"dockerfile": "../Mojo.Dockerfile",
5+
"context": "..",
6+
"args": {
7+
"BUILD_ON_IMAGE": "glcr.b-data.ch/cuda/max/base",
8+
"MOJO_VERSION": "nightly",
9+
// "UNMINIMIZE": "unset-to-keep-minimized",
10+
"JUPYTERLAB_VERSION": "4.3.4",
11+
// "INSTALL_DEVTOOLS": "unset-to-not-install",
12+
"NODE_VERSION": "20.18.1",
13+
"USE_ZSH_FOR_ROOT": "unset-to-use-bash",
14+
"LANG": "en_US.UTF-8",
15+
"TZ": "Etc/UTC"
16+
}
17+
},
18+
19+
"onCreateCommand": "onCreateCommand.sh",
20+
"postStartCommand": "${HOME}/.local/bin/dockerSystemPrune.sh",
21+
"postAttachCommand": "${HOME}/.local/bin/checkForUpdates.sh && postAttachCommand.sh && nvidia_entrypoint.sh",
22+
23+
"features": {
24+
"ghcr.io/devcontainers/features/common-utils:2": {
25+
"configureZshAsDefaultShell": true,
26+
"upgradePackages": false,
27+
"username": "vscode",
28+
"userUid": "automatic",
29+
"userGid": "automatic"
30+
},
31+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
32+
"moby": false
33+
},
34+
// A comma separated list of packages to install
35+
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
36+
"packages": "qpdf"
37+
}
38+
},
39+
40+
"customizations": {
41+
"vscode": {
42+
"extensions": [
43+
"alefragnani.project-manager",
44+
"christian-kohler.path-intellisense",
45+
"DavidAnson.vscode-markdownlint",
46+
47+
"editorconfig.editorconfig",
48+
"GitHub.vscode-pull-request-github",
49+
"GitLab.gitlab-workflow",
50+
"grapecity.gc-excelviewer",
51+
"mhutchie.git-graph",
52+
"modular-mojotools.vscode-mojo-nightly",
53+
"ms-python.python",
54+
"ms-toolsai.jupyter",
55+
"mutantdino.resourcemonitor",
56+
"piotrpalarz.vscode-gitignore-generator",
57+
"redhat.vscode-yaml",
58+
"dbaeumer.vscode-eslint",
59+
"esbenp.prettier-vscode",
60+
"ms-python.black-formatter",
61+
"timonwong.shellcheck",
62+
"exiasr.hadolint",
63+
"ms-azuretools.vscode-docker"
64+
],
65+
"settings": {
66+
"gitlab.aiAssistedCodeSuggestions.enabled": false,
67+
"gitlab.duoChat.enabled": false,
68+
"gitlens.showWelcomeOnInstall": false,
69+
"gitlens.showWhatsNewAfterUpgrades": false,
70+
"resmon.show.battery": false,
71+
"resmon.show.cpufreq": false
72+
}
73+
}
74+
},
75+
76+
// Set 'remoteUser' to 'root' to connect as root instead.
77+
"remoteUser": "vscode",
78+
"workspaceMount": "source=dsdc-cuda-max-nightly-base-home-vscode,target=/home/vscode,type=volume",
79+
// "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-cuda-max-nightly-base-home-vscode,target=/home/vscode,type=bind",
80+
"workspaceFolder": "/home/vscode",
81+
82+
// "remoteUser": "root",
83+
// "workspaceMount": "source=dsdc-cuda-max-nightly-base-root,target=/root,type=volume",
84+
// // "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-cuda-max-nightly-base-root,target=/root,type=bind",
85+
// "workspaceFolder": "/root",
86+
87+
"remoteEnv": {
88+
// By default, CUDA will use all available CUDA-capable devices.
89+
// Set the following environment variable to control the exact devices to use.
90+
// "CUDA_VISIBLE_DEVICES": "0",
91+
//
92+
// By default, BLAS/OpenMP will use as many threads as possible.
93+
// Set the following environment variable to control the exact number to use.
94+
// "OMP_NUM_THREADS": "1",
95+
//
96+
// Pip: Install packages to the user site
97+
"PIP_USER": "1"
98+
},
99+
100+
"runArgs": [
101+
"--gpus", "device=all",
102+
"--shm-size", "2g"
103+
]
104+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"name": "CUDA MAX base",
3+
"build": {
4+
"dockerfile": "../Mojo.Dockerfile",
5+
"context": "..",
6+
"args": {
7+
"BUILD_ON_IMAGE": "glcr.b-data.ch/cuda/max/base",
8+
"MOJO_VERSION": "24.6.0",
9+
// "UNMINIMIZE": "unset-to-keep-minimized",
10+
"JUPYTERLAB_VERSION": "4.3.4",
11+
// "INSTALL_DEVTOOLS": "unset-to-not-install",
12+
"NODE_VERSION": "20.18.1",
13+
"USE_ZSH_FOR_ROOT": "unset-to-use-bash",
14+
"LANG": "en_US.UTF-8",
15+
"TZ": "Etc/UTC"
16+
}
17+
},
18+
19+
"onCreateCommand": "onCreateCommand.sh",
20+
"postStartCommand": "${HOME}/.local/bin/dockerSystemPrune.sh",
21+
"postAttachCommand": "${HOME}/.local/bin/checkForUpdates.sh && postAttachCommand.sh && nvidia_entrypoint.sh",
22+
23+
"features": {
24+
"ghcr.io/devcontainers/features/common-utils:2": {
25+
"configureZshAsDefaultShell": true,
26+
"upgradePackages": false,
27+
"username": "vscode",
28+
"userUid": "automatic",
29+
"userGid": "automatic"
30+
},
31+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
32+
"moby": false
33+
},
34+
// A comma separated list of packages to install
35+
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
36+
"packages": "qpdf"
37+
}
38+
},
39+
40+
"customizations": {
41+
"vscode": {
42+
"extensions": [
43+
"alefragnani.project-manager",
44+
"christian-kohler.path-intellisense",
45+
"DavidAnson.vscode-markdownlint",
46+
47+
"editorconfig.editorconfig",
48+
"GitHub.vscode-pull-request-github",
49+
"GitLab.gitlab-workflow",
50+
"grapecity.gc-excelviewer",
51+
"mhutchie.git-graph",
52+
"modular-mojotools.vscode-mojo",
53+
"ms-python.python",
54+
"ms-toolsai.jupyter",
55+
"mutantdino.resourcemonitor",
56+
"piotrpalarz.vscode-gitignore-generator",
57+
"redhat.vscode-yaml",
58+
"dbaeumer.vscode-eslint",
59+
"esbenp.prettier-vscode",
60+
"ms-python.black-formatter",
61+
"timonwong.shellcheck",
62+
"exiasr.hadolint",
63+
"ms-azuretools.vscode-docker"
64+
],
65+
"settings": {
66+
"gitlab.aiAssistedCodeSuggestions.enabled": false,
67+
"gitlab.duoChat.enabled": false,
68+
"gitlens.showWelcomeOnInstall": false,
69+
"gitlens.showWhatsNewAfterUpgrades": false,
70+
"resmon.show.battery": false,
71+
"resmon.show.cpufreq": false
72+
}
73+
}
74+
},
75+
76+
// Set 'remoteUser' to 'root' to connect as root instead.
77+
"remoteUser": "vscode",
78+
"workspaceMount": "source=dsdc-cuda-max-base-home-vscode,target=/home/vscode,type=volume",
79+
// "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-cuda-max-base-home-vscode,target=/home/vscode,type=bind",
80+
"workspaceFolder": "/home/vscode",
81+
82+
// "remoteUser": "root",
83+
// "workspaceMount": "source=dsdc-cuda-max-base-root,target=/root,type=volume",
84+
// // "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-cuda-max-base-root,target=/root,type=bind",
85+
// "workspaceFolder": "/root",
86+
87+
"remoteEnv": {
88+
// By default, CUDA will use all available CUDA-capable devices.
89+
// Set the following environment variable to control the exact devices to use.
90+
// "CUDA_VISIBLE_DEVICES": "0",
91+
//
92+
// By default, BLAS/OpenMP will use as many threads as possible.
93+
// Set the following environment variable to control the exact number to use.
94+
// "OMP_NUM_THREADS": "1",
95+
//
96+
// Pip: Install packages to the user site
97+
"PIP_USER": "1"
98+
},
99+
100+
"runArgs": [
101+
"--gpus", "device=all",
102+
"--shm-size", "2g"
103+
]
104+
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"name": "CUDA MAX nightly scipy",
3+
"build": {
4+
"dockerfile": "../Mojo.Dockerfile",
5+
"context": "..",
6+
"args": {
7+
"BUILD_ON_IMAGE": "glcr.b-data.ch/cuda/max/scipy",
8+
"MOJO_VERSION": "nightly",
9+
// "UNMINIMIZE": "unset-to-keep-minimized",
10+
"JUPYTERLAB_VERSION": "4.3.4",
11+
// "INSTALL_DEVTOOLS": "unset-to-not-install",
12+
"NODE_VERSION": "20.18.1",
13+
"USE_ZSH_FOR_ROOT": "unset-to-use-bash",
14+
"LANG": "en_US.UTF-8",
15+
"TZ": "Etc/UTC"
16+
}
17+
},
18+
19+
"onCreateCommand": "onCreateCommand.sh",
20+
"postStartCommand": "${HOME}/.local/bin/dockerSystemPrune.sh",
21+
"postAttachCommand": "${HOME}/.local/bin/checkForUpdates.sh && postAttachCommand.sh && nvidia_entrypoint.sh",
22+
23+
"features": {
24+
"ghcr.io/devcontainers/features/common-utils:2": {
25+
"configureZshAsDefaultShell": true,
26+
"upgradePackages": false,
27+
"username": "vscode",
28+
"userUid": "automatic",
29+
"userGid": "automatic"
30+
},
31+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
32+
"moby": false
33+
},
34+
// A comma separated list of packages to install
35+
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
36+
"packages": ""
37+
}
38+
},
39+
40+
"customizations": {
41+
"vscode": {
42+
"extensions": [
43+
"alefragnani.project-manager",
44+
"christian-kohler.path-intellisense",
45+
"DavidAnson.vscode-markdownlint",
46+
47+
"editorconfig.editorconfig",
48+
"GitHub.vscode-pull-request-github",
49+
"GitLab.gitlab-workflow",
50+
"grapecity.gc-excelviewer",
51+
"mhutchie.git-graph",
52+
"modular-mojotools.vscode-mojo-nightly",
53+
"ms-python.python",
54+
"ms-toolsai.jupyter",
55+
"mutantdino.resourcemonitor",
56+
"piotrpalarz.vscode-gitignore-generator",
57+
"redhat.vscode-yaml",
58+
"James-Yu.latex-workshop",
59+
"quarto.quarto",
60+
"dbaeumer.vscode-eslint",
61+
"esbenp.prettier-vscode",
62+
"ms-python.black-formatter",
63+
"timonwong.shellcheck",
64+
"exiasr.hadolint",
65+
"ms-azuretools.vscode-docker"
66+
],
67+
"settings": {
68+
"gitlab.aiAssistedCodeSuggestions.enabled": false,
69+
"gitlab.duoChat.enabled": false,
70+
"gitlens.showWelcomeOnInstall": false,
71+
"gitlens.showWhatsNewAfterUpgrades": false,
72+
"resmon.show.battery": false,
73+
"resmon.show.cpufreq": false
74+
}
75+
}
76+
},
77+
78+
// Set 'remoteUser' to 'root' to connect as root instead.
79+
"remoteUser": "vscode",
80+
"workspaceMount": "source=dsdc-cuda-max-nightly-scipy-home-vscode,target=/home/vscode,type=volume",
81+
// "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-cuda-max-nightly-scipy-home-vscode,target=/home/vscode,type=bind",
82+
"workspaceFolder": "/home/vscode",
83+
84+
// "remoteUser": "root",
85+
// "workspaceMount": "source=dsdc-cuda-max-nightly-scipy-root,target=/root,type=volume",
86+
// // "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-cuda-max-nightly-scipy-root,target=/root,type=bind",
87+
// "workspaceFolder": "/root",
88+
89+
"remoteEnv": {
90+
// By default, CUDA will use all available CUDA-capable devices.
91+
// Set the following environment variable to control the exact devices to use.
92+
// "CUDA_VISIBLE_DEVICES": "0",
93+
//
94+
// By default, BLAS/OpenMP will use as many threads as possible.
95+
// Set the following environment variable to control the exact number to use.
96+
// "OMP_NUM_THREADS": "1",
97+
//
98+
// Pip: Install packages to the user site
99+
"PIP_USER": "1"
100+
},
101+
102+
"runArgs": [
103+
"--gpus", "device=all",
104+
"--shm-size", "2g"
105+
]
106+
}

0 commit comments

Comments
 (0)