|
1 | 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the |
2 | 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu |
3 | 3 | { |
4 | | - "name": "Ubuntu", |
| 4 | + "name": "psc-ubuntu", |
5 | 5 | // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
6 | | - "image": "mcr.microsoft.com/devcontainers/base:jammy", |
7 | | - // Features to add to the dev container. More info: https://containers.dev/features. |
| 6 | + "build": { |
| 7 | + "dockerfile": "Dockerfile", |
| 8 | + "context": "." |
| 9 | + }, |
8 | 10 | "features": { |
9 | | - // "ghcr.io/devcontainers/features/anaconda:1": { |
10 | | - // "version": "latest" |
| 11 | + "ghcr.io/devcontainers/features/common-utils:2": { |
| 12 | + "installZsh": "true", |
| 13 | + "username": "vscode", |
| 14 | + "userUid": "1000", |
| 15 | + "userGid": "1000", |
| 16 | + "upgradePackages": "true" |
| 17 | + }, |
| 18 | + // "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { |
| 19 | + // "packages": [ |
| 20 | + // ] |
11 | 21 | // }, |
12 | | - "ghcr.io/itsmechlark/features/act:1": { |
13 | | - "version": "latest" |
14 | | - }, |
15 | | - "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { |
16 | | - "packages": [ |
17 | | - "csh", |
18 | | - "gawk", |
19 | | - "gfortran", |
20 | | - "libopenmpi-dev", |
21 | | - "autoconf", |
22 | | - "automake", |
23 | | - "libtool", |
24 | | - "cmake", |
25 | | - "libhdf5-dev", |
26 | | - "hdf5-tools", |
27 | | - "less", |
28 | | - "python3-pip", |
29 | | - "libpython3-dev", |
30 | | - "clang-format", |
31 | | - "ninja-build", |
32 | | - "findent", |
33 | | - "pandoc" |
34 | | - ] |
35 | | - }, |
36 | | - "ghcr.io/unh-hpc/features/adios2:0.0.2": {} |
37 | | - }, |
38 | | - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 22 | + |
| 23 | + // "ghcr.io/devcontainers/features/git:1": { |
| 24 | + // "version": "latest", |
| 25 | + // "ppa": "false" |
| 26 | + // } |
| 27 | + }, |
| 28 | + // Feat``ures to add to the dev container. More info: https://containers.dev/features. |
| 29 | +` // Use 'forwardPorts' to make a list of ports inside the container available locally. |
39 | 30 | // "forwardPorts": [], |
40 | 31 | // Use 'postCreateCommand' to run commands after the container is created. |
41 | | - "postCreateCommand": "pip install uv && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list > /dev/null && sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-cuda-toolkit && sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && echo 'export OPENGGCMDIR=/workspaces/openggcm' >> /home/vscode/.bashrc && echo 'shopt -u progcomp' >> /home/vscode/.bashrc && echo 'alias ll=\"ls -lrt\"' >> /home/vscode/.bashrc", |
| 32 | + // "postCreateCommand": "curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list > /dev/null && sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-cuda-toolkit && echo 'shopt -u progcomp' >> /home/vscode/.bashrc && echo 'alias ll=\"ls -lrt\"' >> /home/vscode/.bashrc", |
| 33 | + "postCreateCommand": "echo export CMAKE_PREFIX_PATH=/usr/local/cuda/lib64/cmake >> ~/.bashrc", |
42 | 34 | // "echo export OPENGGCMDIR=/workspaces/openggcm >> ~/.zshrc; echo PATH=$HOME/bin:$PATH >> ~/.zshrc", |
43 | 35 | "customizations": { |
44 | 36 | "vscode": { |
45 | 37 | "extensions": [ |
46 | 38 | "ms-vscode.cmake-tools", |
47 | 39 | "ms-vscode.cpptools-extension-pack", |
48 | | - "fortran-lang.linter-gfortran", |
49 | 40 | "ms-toolsai.jupyter", |
50 | | - "ms-python.python", |
51 | | - "Github.vscode-pull-request-github", |
52 | | - "tamasfe.even-better-toml", |
53 | | - "charliermarsh.ruff" |
| 41 | + "ms-python.python" |
54 | 42 | ] |
55 | 43 | } |
56 | 44 | } |
| 45 | + |
57 | 46 | // Configure tool-specific properties. |
58 | 47 | // "customizations": {}, |
59 | 48 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
|
0 commit comments