|
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-cuda", |
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 |
| - // "image": "nvidia/cuda:12.3.1-runtime-ubuntu22.04", |
8 |
| - "image": "nvidia/cuda:12.8.0-runtime-ubuntu24.04", |
| 4 | + "name": "ubuntu-cuda", |
| 5 | + "image": "nvidia/cuda:12.8.0-runtime-ubuntu24.04", |
9 | 6 |
|
10 |
| - // prettier-ignore |
11 |
| - "runArgs": [ |
| 7 | + // prettier-ignore |
| 8 | + "runArgs": [ |
12 | 9 | "--name", "${localEnv:USER}-${localWorkspaceFolderBasename}",
|
13 | 10 | "--gpus", "all"
|
14 | 11 | ],
|
15 | 12 |
|
16 |
| - "hostRequirements": { |
17 |
| - "gpu": true |
18 |
| - }, |
| 13 | + "hostRequirements": { |
| 14 | + "gpu": true |
| 15 | + }, |
19 | 16 |
|
20 |
| - "remoteEnv": { |
21 |
| - "PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/.config/scripts/bin" |
22 |
| - }, |
| 17 | + "containerEnv": { |
| 18 | + "TZ": "Asia/Seoul", |
| 19 | + "LANG": "ko_KR.UTF-8", |
| 20 | + "LC_MESSAGES": "POSIX", |
| 21 | + "NVIDIA_VISIBLE_DEVICES": "all", |
| 22 | + "NVIDIA_DRIVER_CAPABILITIES": "compute,utility" |
| 23 | + }, |
23 | 24 |
|
24 |
| - "containerEnv": { |
25 |
| - "TZ": "Asia/Seoul", |
26 |
| - "LANG": "ko_KR.UTF-8", |
27 |
| - "LC_MESSAGES": "POSIX", |
28 |
| - "NVIDIA_VISIBLE_DEVICES": "all", |
29 |
| - "NVIDIA_DRIVER_CAPABILITIES": "compute,utility", |
30 |
| - // env variable using in post-create.sh |
31 |
| - "SKIP_PACKAGES_UPDATE": "false", |
32 |
| - // groups to ignore when poetry install (see groups in pyproject.toml) |
33 |
| - // "POETRY_WITHOUT_GROUPS": "pytorch,test" |
34 |
| - "POETRY_WITHOUT_GROUPS": "" |
35 |
| - }, |
36 |
| - "containerUser": "vscode", |
| 25 | + "workspaceFolder": "/workspace/${localWorkspaceFolderBasename}", |
| 26 | + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/${localWorkspaceFolderBasename},type=bind,consistency=cached", |
37 | 27 |
|
38 |
| - "workspaceFolder": "/home/vscode/workspace/${localWorkspaceFolderBasename}", |
39 |
| - "workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/workspace/${localWorkspaceFolderBasename},type=bind,consistency=cached", |
| 28 | + "containerUser": "ubuntu", |
| 29 | + // "remoteUser": "ubuntu", |
40 | 30 |
|
41 |
| - // Use 'postCreateCommand' to run commands after the container is created. |
42 |
| - // "postCreateCommand": "zsh ${containerWorkspaceFolder}/.config/scripts/post-create.sh", |
43 |
| - // "waitFor": "postCreateCommand", |
| 31 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 32 | + "postCreateCommand": "/bin/bash -c '.config/scripts/post-create.sh'", |
| 33 | + "waitFor": "postCreateCommand", |
44 | 34 |
|
45 |
| - "shutdownAction": "stopContainer", |
| 35 | + "shutdownAction": "stopContainer", |
46 | 36 |
|
47 |
| - // Features to add to the dev container. More info: https://containers.dev/features. |
48 |
| - "features": { |
49 |
| - "ghcr.io/devcontainers/features/common-utils:2": { |
50 |
| - "username": "vscode", |
51 |
| - "configureZshAsDefaultShell": true |
52 |
| - }, |
53 |
| - "ghcr.io/devcontainers/features/python:1": { |
54 |
| - "installTools": false, |
55 |
| - "version": "latest" |
| 37 | + // Features to add to the dev container. More info: https://containers.dev/features. |
| 38 | + "features": { |
| 39 | + "ghcr.io/devcontainers/features/common-utils:2": { |
| 40 | + "configureZshAsDefaultShell": true, |
| 41 | + "installOhMyZsh": false |
| 42 | + }, |
| 43 | + "ghcr.io/devcontainers/features/python:1": { |
| 44 | + "installTools": false, |
| 45 | + "version": "latest" |
| 46 | + }, |
| 47 | + "ghcr.io/devcontainers-contrib/features/poetry:2": {} |
56 | 48 | },
|
57 |
| - "ghcr.io/devcontainers-contrib/features/poetry:2": {}, |
58 |
| - "ghcr.io/withfig/features/fig:1": {} |
59 |
| - }, |
60 | 49 |
|
61 |
| - // Configure tool-specific properties. |
62 |
| - "customizations": { |
63 |
| - "vscode": { |
64 |
| - "extensions": [ |
65 |
| - "ms-python.python", |
66 |
| - "ms-python.debugpy", |
67 |
| - "ms-python.vscode-pylance", |
68 |
| - "ms-python.vscode-python-envs", |
69 |
| - "ms-toolsai.jupyter", |
70 |
| - "charliermarsh.ruff", |
71 |
| - "esbenp.prettier-vscode", |
72 |
| - "tamasfe.even-better-toml", |
73 |
| - "IronGeek.vscode-env", |
74 |
| - "foxundermoon.shell-format" |
75 |
| - ] |
| 50 | + // Configure tool-specific properties. |
| 51 | + "customizations": { |
| 52 | + "vscode": { |
| 53 | + "extensions": [ |
| 54 | + "ms-python.python", |
| 55 | + "ms-python.debugpy", |
| 56 | + "ms-python.vscode-pylance", |
| 57 | + "ms-toolsai.jupyter", |
| 58 | + "charliermarsh.ruff", |
| 59 | + "esbenp.prettier-vscode", |
| 60 | + "tamasfe.even-better-toml", |
| 61 | + "foxundermoon.shell-format" |
| 62 | + ] |
| 63 | + } |
76 | 64 | }
|
77 |
| - } |
78 | 65 |
|
79 |
| - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
80 |
| - // "forwardPorts": [9000], |
| 66 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 67 | + // "forwardPorts": [9000], |
81 | 68 |
|
82 |
| - // Use 'portsAttributes' to set default properties for specific forwarded ports. |
83 |
| - // More info: https://containers.dev/implementors/json_reference/#port-attributes |
84 |
| - // "portsAttributes": { |
85 |
| - // "9000": { |
86 |
| - // "label": "Hello Remote World", |
87 |
| - // "onAutoForward": "notify" |
88 |
| - // } |
89 |
| - // }, |
| 69 | + // Use 'portsAttributes' to set default properties for specific forwarded ports. |
| 70 | + // More info: https://containers.dev/implementors/json_reference/#port-attributes |
| 71 | + // "portsAttributes": { |
| 72 | + // "9000": { |
| 73 | + // "label": "Hello Remote World", |
| 74 | + // "onAutoForward": "notify" |
| 75 | + // } |
| 76 | + // }, |
90 | 77 |
|
91 |
| - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
92 |
| - // "remoteUser": "root" |
| 78 | + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
| 79 | + // "remoteUser": "root" |
93 | 80 | }
|
0 commit comments