-
Notifications
You must be signed in to change notification settings - Fork 753
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
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fdd72a3
update devcontainer
ryanolson 13b7045
adding per-instance venv
ryanolson 409cbf4
install basic requirements and pre-commit on post-create
ryanolson bb54e2b
adding requirements
ryanolson f44d4c4
update default venv path
ryanolson f1ca3fe
adding .devcontainer to git ignore to allow local updates
ryanolson 856e617
moving .devcontainer -> .devcontainer.template
ryanolson 17ae7ef
adding copyright headers
ryanolson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| FROM nixl:v0.1.0.dev.0780842 | ||
|
|
||
| # 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 git-lfs&& \ | ||
| # 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 | ||
|
|
||
| RUN git lfs install |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| #!/bin/bash | ||
|
|
||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| trap 'echo "❌ ERROR: Command failed at line $LINENO: $BASH_COMMAND"; echo "⚠️ This was unexpected and setup was not completed. Can try to resolve yourself and then manually run the rest of the commands in this file or file a bug."' ERR | ||
|
|
||
| retry() { | ||
| # retries for connectivity issues in installs | ||
| local retries=3 | ||
| local count=0 | ||
| until "$@"; do | ||
| exit_code=$? | ||
| wait_time=$((2 ** count)) | ||
| echo "Command failed with exit code $exit_code. Retrying in $wait_time seconds..." | ||
| sleep $wait_time | ||
| count=$((count + 1)) | ||
| if [ $count -ge $retries ]; then | ||
| echo "Command failed after $retries attempts." | ||
| return $exit_code | ||
| fi | ||
| done | ||
| return 0 | ||
| } | ||
|
|
||
| set -xe | ||
|
|
||
| # Create virtual environment if it doesn't exist | ||
| VENV_PATH="venv" | ||
| if [ ! -d "$VENV_PATH" ]; then | ||
| echo "🐍 Creating virtual environment at $VENV_PATH..." | ||
| uv venv "$VENV_PATH" | ||
| echo "✅ Virtual environment created successfully" | ||
| else | ||
| echo "🐍 Virtual environment already exists at $VENV_PATH" | ||
| fi | ||
|
|
||
| # Activate the virtual environment for this script | ||
| source "$VENV_PATH/bin/activate" | ||
|
|
||
| uv pip install -r .devcontainer/requirements.txt | ||
|
|
||
| pre-commit install | ||
|
|
||
|
|
||
| # # Changing permission to match local user since volume mounts default to root ownership | ||
| # sudo chown -R ubuntu:ubuntu ~/.cache/pre-commit | ||
|
|
||
| # # Pre-commit hooks | ||
| # cd $HOME/dynamo && pre-commit install && retry pre-commit install-hooks | ||
| # pre-commit run --all-files || true # don't fail the build if pre-commit hooks fail | ||
|
|
||
| # # Set build directory | ||
| # mkdir -p $HOME/dynamo/.build/target | ||
| # export CARGO_TARGET_DIR=$HOME/dynamo/.build/target | ||
|
|
||
| # # build project, it will be saved at $HOME/dynamo/.build/target | ||
| # cargo build --locked --profile dev --features mistralrs | ||
| # cargo doc --no-deps | ||
|
|
||
| # # create symlinks for the binaries in the deploy directory | ||
| # mkdir -p $HOME/dynamo/deploy/sdk/src/dynamo/sdk/cli/bin | ||
| # ln -sf $HOME/dynamo/.build/target/debug/dynamo-run $HOME/dynamo/deploy/sdk/src/dynamo/sdk/cli/bin/dynamo-run | ||
|
|
||
| # # install the python bindings | ||
| # cd $HOME/dynamo/lib/bindings/python && retry maturin develop | ||
|
|
||
| # # installs overall python packages, grabs binaries from .build/target/debug | ||
| # cd $HOME/dynamo && retry env DYNAMO_BIN_PATH=$HOME/dynamo/.build/target/debug uv pip install -e . | ||
|
|
||
| # export PYTHONPATH=/home/ubuntu/dynamo/components/planner/src:$PYTHONPATH | ||
|
|
||
| # # TODO: Deprecated except vLLM v0 | ||
| # if ! grep -q "export VLLM_KV_CAPI_PATH=" ~/.bashrc; then | ||
| # echo "export VLLM_KV_CAPI_PATH=$HOME/dynamo/.build/target/debug/libdynamo_llm_capi.so" >> ~/.bashrc | ||
| # fi | ||
|
|
||
| # if ! grep -q "export GPG_TTY=" ~/.bashrc; then | ||
| # echo "export GPG_TTY=$(tty)" >> ~/.bashrc | ||
| # fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| maturin | ||
| patchelf | ||
| pre-commit |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| .devcontainer | ||
|
|
||
| .idea | ||
| .vs/ | ||
| .vscode/ | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Malformed feature options – UID env var & boolean type
"${localEnv:UID-1000}"is not a valid environment-variable key (dash not allowed). This will resolve to an empty string and the feature will fail.Also
upgradePackagesexpects a JSONC boolean, not a string.📝 Committable suggestion
🤖 Prompt for AI Agents