Skip to content

Commit 0653f50

Browse files
committed
Mojo: Add Dev Container including MAX
1 parent acb37ab commit 0653f50

File tree

10 files changed

+410
-13
lines changed

10 files changed

+410
-13
lines changed

.devcontainer/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
!/julia-base/scripts/usr/
3737
!/julia-base/scripts/usr/local/
3838
!/julia-base/scripts/usr/local/bin/
39+
!/max-*/
3940
!/mojo-*/
4041
!/mojo-base/conf/
4142
!/mojo-base/conf/jupyterlab/
@@ -88,6 +89,7 @@
8889
!/julia-*/devcontainer.json
8990
!/julia-base/conf/julia/etc/skel/.julia/config/*.jl
9091
!/julia-base/scripts/usr/local/bin/*.sh
92+
!/max-*/devcontainer.json
9193
!/mojo-*/devcontainer.json
9294
!/mojo-base/conf/jupyterlab/usr/local/etc/jupyter/jupyter_server_config.d/mojo-lsp-server.json
9395
!/mojo-base/scripts/usr/local/bin/*.sh

.devcontainer/conf/shell/var/tmp/snippets/rc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
# remove potentially appended $HOME/.local/bin from PATH
3-
PATH="${PATH%:$HOME/.local/bin}"
2+
# remove potentially present $HOME/.local/bin from PATH
3+
PATH="${PATH/:$HOME\/.local\/bin/}"
44

55
# set PATH so it includes user's private bin if it exists
66
if [ -d "$HOME/bin" ] && [[ "$PATH" != *"$HOME/bin"* ]] ; then
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"name": "Mojo nightly (MAX) base",
3+
"build": {
4+
"dockerfile": "../Mojo.Dockerfile",
5+
"context": "..",
6+
"args": {
7+
"BUILD_ON_IMAGE": "glcr.b-data.ch/max/base",
8+
"MOJO_VERSION": "nightly",
9+
// "UNMINIMIZE": "unset-to-keep-minimized",
10+
"JUPYTERLAB_VERSION": "4.2.5",
11+
// "INSTALL_DEVTOOLS": "unset-to-not-install",
12+
"NODE_VERSION": "20.17.0",
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",
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-max-nightly-base-home-vscode,target=/home/vscode,type=volume",
79+
// "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-max-nightly-base-home-vscode,target=/home/vscode,type=bind",
80+
"workspaceFolder": "/home/vscode",
81+
82+
// "remoteUser": "root",
83+
// "workspaceMount": "source=dsdc-max-nightly-base-root,target=/root,type=volume",
84+
// // "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-max-nightly-base-root,target=/root,type=bind",
85+
// "workspaceFolder": "/root",
86+
87+
// By default, BLAS/OpenMP will use as many threads as possible.
88+
// Set the following environment variable to control the exact number to use.
89+
"remoteEnv": {
90+
// "OMP_NUM_THREADS": "1",
91+
//
92+
// Pip: Install packages to the user site
93+
"PIP_USER": "1"
94+
}
95+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"name": "Mojo (MAX) base",
3+
"build": {
4+
"dockerfile": "../Mojo.Dockerfile",
5+
"context": "..",
6+
"args": {
7+
"BUILD_ON_IMAGE": "glcr.b-data.ch/max/base",
8+
"MOJO_VERSION": "24.5.0",
9+
// "UNMINIMIZE": "unset-to-keep-minimized",
10+
"JUPYTERLAB_VERSION": "4.2.5",
11+
// "INSTALL_DEVTOOLS": "unset-to-not-install",
12+
"NODE_VERSION": "20.17.0",
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",
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-max-base-home-vscode,target=/home/vscode,type=volume",
79+
// "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-max-base-home-vscode,target=/home/vscode,type=bind",
80+
"workspaceFolder": "/home/vscode",
81+
82+
// "remoteUser": "root",
83+
// "workspaceMount": "source=dsdc-max-base-root,target=/root,type=volume",
84+
// // "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-max-base-root,target=/root,type=bind",
85+
// "workspaceFolder": "/root",
86+
87+
// By default, BLAS/OpenMP will use as many threads as possible.
88+
// Set the following environment variable to control the exact number to use.
89+
"remoteEnv": {
90+
// "OMP_NUM_THREADS": "1",
91+
//
92+
// Pip: Install packages to the user site
93+
"PIP_USER": "1"
94+
}
95+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"name": "Mojo nightly (MAX) scipy",
3+
"build": {
4+
"dockerfile": "../Mojo.Dockerfile",
5+
"context": "..",
6+
"args": {
7+
"BUILD_ON_IMAGE": "glcr.b-data.ch/max/scipy",
8+
"MOJO_VERSION": "nightly",
9+
// "UNMINIMIZE": "unset-to-keep-minimized",
10+
"JUPYTERLAB_VERSION": "4.2.5",
11+
// "INSTALL_DEVTOOLS": "unset-to-not-install",
12+
"NODE_VERSION": "20.17.0",
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",
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-max-nightly-scipy-home-vscode,target=/home/vscode,type=volume",
81+
// "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-max-nightly-scipy-home-vscode,target=/home/vscode,type=bind",
82+
"workspaceFolder": "/home/vscode",
83+
84+
// "remoteUser": "root",
85+
// "workspaceMount": "source=dsdc-max-nightly-scipy-root,target=/root,type=volume",
86+
// // "workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/bind-mounts/dsdc-max-nightly-scipy-root,target=/root,type=bind",
87+
// "workspaceFolder": "/root",
88+
89+
// By default, BLAS/OpenMP will use as many threads as possible.
90+
// Set the following environment variable to control the exact number to use.
91+
"remoteEnv": {
92+
// "OMP_NUM_THREADS": "1",
93+
//
94+
// Pip: Install packages to the user site
95+
"PIP_USER": "1"
96+
}
97+
}

0 commit comments

Comments
 (0)