-
Notifications
You must be signed in to change notification settings - Fork 751
refactor: update devcontainer #2025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fdd72a3
13b7045
409cbf4
bb54e2b
f44d4c4
f1ca3fe
856e617
17ae7ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| FROM nixl:v0.1.0.dev.0704dc0 | ||
|
|
||
| # Install sudo, LLVM (latest stable), and configure passwordless sudo for all users | ||
| RUN apt-get update && \ | ||
| apt-get install -y sudo wget lsb-release software-properties-common gnupg ca-certificates && \ | ||
| # Install latest stable LLVM using official script | ||
| bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" && \ | ||
| apt-get clean && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| # Add all users to sudo group and enable passwordless sudo | ||
| echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,7 +16,10 @@ | |||||||||||||||||||||||||
| "name": "NVIDIA Dynamo Development", | ||||||||||||||||||||||||||
| "remoteUser": "ubuntu", // Matches our container user | ||||||||||||||||||||||||||
| "updateRemoteUserUID": true, // Updates the UID of the remote user to match the host user, avoids permission errors | ||||||||||||||||||||||||||
| "image": "dynamo:latest-vllm-local-dev", // Use the latest VLLM local dev image | ||||||||||||||||||||||||||
| // "image": "dynamo:latest-vllm-local-dev", // Use the latest VLLM local dev image | ||||||||||||||||||||||||||
| "build": { | ||||||||||||||||||||||||||
| "dockerfile": "Dockerfile" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "runArgs": [ | ||||||||||||||||||||||||||
| "--gpus=all", | ||||||||||||||||||||||||||
| "--network=host", | ||||||||||||||||||||||||||
|
|
@@ -37,51 +40,43 @@ | |||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "settings": { | ||||||||||||||||||||||||||
| "terminal.integrated.defaultProfile.linux": "bash", | ||||||||||||||||||||||||||
| "terminal.integrated.cwd": "/home/ubuntu/dynamo", | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| "python.defaultInterpreterPath": "/opt/dynamo/venv/bin/python", | ||||||||||||||||||||||||||
| "python.defaultInterpreterPath": "/home/ubuntu/.venv/bin/python", | ||||||||||||||||||||||||||
| "python.linting.enabled": true, | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| "rust-analyzer.memoryLimit": 4096, // larger memory limit to reduce latency | ||||||||||||||||||||||||||
| "rust-analyzer.checkOnSave.command": "clippy", | ||||||||||||||||||||||||||
| "rust-analyzer.checkOnSave.enable": true, | ||||||||||||||||||||||||||
| "rust-analyzer.cargo.buildScripts.enable": true, | ||||||||||||||||||||||||||
| "rust-analyzer.cargo.targetDir": "/home/ubuntu/dynamo/.build/target", | ||||||||||||||||||||||||||
| // "rust-analyzer.cargo.targetDir": "/work/.build/target", | ||||||||||||||||||||||||||
| "rust-analyzer.procMacro.enable": true, | ||||||||||||||||||||||||||
| "rust-analyzer.completion.autoimport.enable": true, | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| // Enhanced rust-analyzer configuration | ||||||||||||||||||||||||||
| "rust-analyzer.linkedProjects": [ | ||||||||||||||||||||||||||
| "dynamo/Cargo.toml", | ||||||||||||||||||||||||||
| "dynamo/lib/runtime/Cargo.toml", | ||||||||||||||||||||||||||
| "dynamo/lib/llm/Cargo.toml", | ||||||||||||||||||||||||||
| "dynamo/lib/tokens/Cargo.toml", | ||||||||||||||||||||||||||
| "dynamo/lib/bindings/python/Cargo.toml", | ||||||||||||||||||||||||||
| "dynamo/launch/dynamo-run/Cargo.toml" | ||||||||||||||||||||||||||
| "Cargo.toml", | ||||||||||||||||||||||||||
| "lib/bindings/python/Cargo.toml", | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| "files.trimTrailingWhitespace": true, | ||||||||||||||||||||||||||
| "files.insertFinalNewline": true | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "workspaceFolder": "/home/ubuntu", | ||||||||||||||||||||||||||
| "workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/dynamo,type=bind,consistency=cached", | ||||||||||||||||||||||||||
| "userEnvProbe": "interactiveShell", | ||||||||||||||||||||||||||
| "postCreateCommand": "/bin/bash /home/ubuntu/dynamo/.devcontainer/post-create.sh", // Runs cargo build and pip installs packages | ||||||||||||||||||||||||||
| // "postCreateCommand": "/bin/bash /work/.devcontainer/post-create.sh", // Runs cargo build and pip installs packages | ||||||||||||||||||||||||||
| "containerEnv": { | ||||||||||||||||||||||||||
| "GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}", | ||||||||||||||||||||||||||
| "HF_TOKEN": "${localEnv:HF_TOKEN}", | ||||||||||||||||||||||||||
| "CARGO_HOME": "/home/ubuntu/dynamo/.build/.cargo", | ||||||||||||||||||||||||||
| "RUSTUP_HOME": "/home/ubuntu/dynamo/.build/.rustup" | ||||||||||||||||||||||||||
| "CARGO_HOME": "/home/ubuntu/.cargo" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "mounts": [ | ||||||||||||||||||||||||||
| // Default mounts | ||||||||||||||||||||||||||
| "source=/tmp/,target=/tmp/,type=bind", | ||||||||||||||||||||||||||
| "source=dynamo-bashhistory,target=/home/ubuntu/.commandhistory,type=volume", // For bash history | ||||||||||||||||||||||||||
| "source=dynamo-precommit-cache,target=/home/ubuntu/.cache/pre-commit,type=volume" // For pre-commit cache | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| // Uncomment for additional functionality | ||||||||||||||||||||||||||
| // "source=${localEnv:HF_HOME},target=/home/ubuntu/.cache/huggingface,type=bind", // Uncomment to enable HF Cache Mount. Make sure to set HF_HOME env var in you .bashrc | ||||||||||||||||||||||||||
| "source=${localEnv:HOME},target=/home/ubuntu,type=bind" | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "features": { | ||||||||||||||||||||||||||
| "ghcr.io/devcontainers/features/common-utils:2": { | ||||||||||||||||||||||||||
| "userUid": "${localEnv:UID-1000}", | ||||||||||||||||||||||||||
| "userGid": "${localEnv:UID-1000}", | ||||||||||||||||||||||||||
| "upgradePackages": "false" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
Comment on lines
+72
to
+77
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Malformed feature options – UID env var & boolean type - "userUid": "${localEnv:UID-1000}",
- "userGid": "${localEnv:UID-1000}",
- "upgradePackages": "false"
+ "userUid": "${localEnv:UID}",
+ "userGid": "${localEnv:UID}",
+ "upgradePackages": false📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "overrideFeatureInstallOrder": [ | ||||||||||||||||||||||||||
| "ghcr.io/devcontainers/features/common-utils" | ||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Slim down the image and harden sudo setup
--no-install-recommendsto theapt-get installline – it cuts bloat by skipping docs and ancillary packages./etc/sudoers; if theubuntuuser (or any other) is not already in thesudogroup it will still lack sudo rights. Either ensure the user is added (usermod -aG sudo ubuntu) or re-phrase the comment.llvm.sh) at build-time without pinning a checksum makes reproducibility brittle. At minimum, pin the expected SHA256 or an explicit LLVM version (LLVM_VERSION=17 bash …) so future upstream changes don’t silently break the build.📝 Committable suggestion
🤖 Prompt for AI Agents