Skip to content

Commit a2c2469

Browse files
authored
Merge branch 'main' into nmailhot/final-error-log
2 parents b87a752 + 6e24123 commit a2c2469

File tree

579 files changed

+42738
-7657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

579 files changed

+42738
-7657
lines changed

.devcontainer/README.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
<!--
22
SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
SPDX-License-Identifier: Apache-2.0
4-
5-
Licensed under the Apache License, Version 2.0 (the "License");
6-
you may not use this file except in compliance with the License.
7-
You may obtain a copy of the License at
8-
9-
http://www.apache.org/licenses/LICENSE-2.0
10-
11-
Unless required by applicable law or agreed to in writing, software
12-
distributed under the License is distributed on an "AS IS" BASIS,
13-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
See the License for the specific language governing permissions and
15-
limitations under the License.
164
-->
175

186
# NVIDIA Dynamo Development Environment
197

208
> Warning: Dev Containers (aka `devcontainers`) is an evolving feature and we are not testing in CI. Please submit any problem/feedback using the issues on GitHub.
219
10+
## Known Issues
11+
12+
### Docker Version Compatibility
13+
14+
**Docker 29.x has compatibility issues with Dev Containers (by Anysphere):**
15+
- It is known that Docker Engine version **29.0.1** (released November 14, 2025) may cause Dev Containers to hang all the time, rendering it unusable
16+
- The Dev Containers extension (v1.0.26) and devcontainer CLI (v0.75.0) were not tested against Docker 29.x
17+
- Symptoms: Container builds successfully but connection hangs, requiring a manual reload to connect
18+
- This may be fixed in a later version of the Anysphere Dev Containers extension and/or Docker Engine patch
19+
20+
**Recommended Docker Version:**
21+
- Use Docker Engine **28.5.2** or earlier for stable Dev Container operation
22+
- Docker 27.x and 28.x series are confirmed working with current Dev Containers tooling
23+
2224
## Framework-Specific Devcontainers
2325

2426
This directory contains framework-specific devcontainer configurations generated from a Jinja2 template:
@@ -79,16 +81,16 @@ graph TB
7981
HFCACHE["~/.cache/huggingface<br/>(host cache)"]
8082
GITCONFIG["~/.gitconfig<br/>(host git config)"]
8183
82-
subgraph CONTAINER["Docker Container<br/>vsc-dynamo-SHA-uid<br/>Running as: ubuntu user"]
83-
MOUNT["/home/ubuntu/dynamo<br/>(mounted directory)"]
84-
HFMOUNT["/home/ubuntu/.cache/huggingface<br/>(mounted cache)"]
85-
GITCONFIGCOPY["/home/ubuntu/.gitconfig<br/>(via Dev Container setting)"]
84+
subgraph CONTAINER["Docker Container<br/>vsc-dynamo-SHA-uid<br/>Running as: dynamo user"]
85+
MOUNT["/home/dynamo/dynamo<br/>(mounted directory)"]
86+
HFMOUNT["/home/dynamo/.cache/huggingface<br/>(mounted cache)"]
87+
GITCONFIGCOPY["/home/dynamo/.gitconfig<br/>(via Dev Container setting)"]
8688
TOOLS["rust-analyzer<br/>cargo<br/>etc."]
8789
end
8890
8991
IMAGE["Docker Image<br/>dynamo:latest-{framework}-local-dev<br/>(vllm/sglang/trtllm)"]
9092
91-
IMAGE -->|"docker run<br/>as ubuntu user"| CONTAINER
93+
IMAGE -->|"docker run<br/>as dynamo user"| CONTAINER
9294
end
9395
9496
TERM -->|"SSH Connection"| DIR
@@ -260,9 +262,9 @@ File Structure:
260262
- Local dynamo repo mounts to `/workspace`
261263
- Python venv in `/opt/dynamo/venv`
262264
- Build artifacts in `/workspace/target`
263-
- Hugging Face cache preserved between sessions (either mounting your host .cache to the container, or your `HF_HOME` to `/home/ubuntu/.cache/huggingface`)
264-
- Bash memory preserved between sessions at `/home/ubuntu/.commandhistory` using docker volume `dynamo-bashhistory`
265-
- Precommit preserved between sessions at `/home/ubuntu/.cache/precommit` using docker volume `dynamo-precommit-cache`
265+
- Hugging Face cache preserved between sessions (either mounting your host .cache to the container, or your `HF_HOME` to `/home/dynamo/.cache/huggingface`)
266+
- Bash memory preserved between sessions at `/home/dynamo/.commandhistory` using docker volume `dynamo-bashhistory`
267+
- Precommit preserved between sessions at `/home/dynamo/.cache/precommit` using docker volume `dynamo-precommit-cache`
266268

267269
## Documentation
268270

@@ -397,8 +399,8 @@ docker volume prune -f
397399
**Note:** This resets bash history and pre-commit cache.
398400

399401
**Volume Mounts in devcontainer.json:**
400-
- `dynamo-bashhistory``/home/ubuntu/.commandhistory` (bash history)
401-
- `dynamo-precommit-cache``/home/ubuntu/.cache/pre-commit` (pre-commit cache)
402+
- `dynamo-bashhistory``/home/dynamo/.commandhistory` (bash history)
403+
- `dynamo-precommit-cache``/home/dynamo/.cache/pre-commit` (pre-commit cache)
402404

403405
### Permission Issues
404406

.devcontainer/post-create.sh

Lines changed: 24 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ WORKSPACE_DIR="${WORKSPACE_DIR:-/workspace}"
1111
# Ensure we're not running as root
1212
if [ "$(id -u)" -eq 0 ]; then
1313
echo "❌ ERROR: This script should not be run as root!"
14-
echo "The script should run as the 'ubuntu' user, not root."
14+
echo "The script should run as the 'dynamo' user, not root."
1515
echo "Current user: $(whoami) (UID: $(id -u))"
1616
exit 1
1717
fi
1818

1919
# Verify we're running as the expected user
20-
if [ "$(whoami)" != "ubuntu" ]; then
21-
echo "⚠️ WARNING: Expected to run as 'ubuntu' user, but running as '$(whoami)'"
20+
if [ "$(whoami)" != "dynamo" ]; then
21+
echo "⚠️ WARNING: Expected to run as 'dynamo' user, but running as '$(whoami)'"
2222
echo "This might cause permission issues."
2323
fi
2424

@@ -48,7 +48,9 @@ show_and_run() {
4848
# Run commands with debug output shown
4949
set -x
5050
"$@"
51+
local exit_code=$?
5152
{ set +x; } 2>/dev/null
53+
return $exit_code
5254
}
5355

5456
set -x
@@ -62,28 +64,7 @@ pre-commit run --all-files || true # don't fail the build if pre-commit hooks fa
6264
export CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-$WORKSPACE_DIR/target}
6365
mkdir -p $CARGO_TARGET_DIR
6466

65-
uv pip uninstall --yes ai-dynamo ai-dynamo-runtime 2>/dev/null || true
66-
67-
# Build project, with `dev` profile it will be saved at $CARGO_TARGET_DIR/debug
68-
cargo build --locked --profile dev --features dynamo-llm/block-manager
69-
70-
# install the python bindings
71-
72-
# Install maturin if not already installed.
73-
# TODO: Uncomment for SGLANG. Right now, the CI team is making a refactor
74-
# to the Dockerfile, so this is a temporary fix.
75-
# if ! command -v maturin &> /dev/null; then
76-
# echo "Installing maturin..."
77-
# retry uv pip install maturin[patchelf]
78-
# else
79-
# echo "maturin is already installed"
80-
# fi
81-
82-
# install ai-dynamo-runtime
83-
(cd $WORKSPACE_DIR/lib/bindings/python && retry maturin develop)
84-
85-
# install ai-dynamo
86-
cd $WORKSPACE_DIR && retry env DYNAMO_BIN_PATH=$CARGO_TARGET_DIR/debug uv pip install -e .
67+
# Note: Build steps moved to after sanity check - see instructions at the end
8768

8869
{ set +x; } 2>/dev/null
8970

@@ -114,16 +95,26 @@ else
11495
echo "⚠️ SSH agent forwarding not configured - SSH_AUTH_SOCK is not set"
11596
fi
11697

117-
show_and_run $WORKSPACE_DIR/deploy/sanity_check.py
98+
echo -e "\n🔍 Running sanity check..."
99+
if show_and_run $WORKSPACE_DIR/deploy/sanity_check.py; then
100+
SANITY_STATUS="✅ Sanity check passed"
101+
else
102+
SANITY_STATUS="⚠️ Sanity check failed - review output above"
103+
fi
118104

119105
cat <<EOF
120106
121-
✅ SUCCESS: Built cargo project, installed Python bindings, configured pre-commit hooks
107+
========================================
108+
$SANITY_STATUS
109+
✅ Pre-commit hooks configured
110+
111+
Now build the project:
112+
cargo build --locked --profile dev --features dynamo-llm/block-manager
113+
cd lib/bindings/python && maturin develop --uv
114+
DYNAMO_BIN_PATH=$CARGO_TARGET_DIR/debug uv pip install -e .
115+
116+
Optional: cd lib/bindings/kvbm && maturin develop --uv # For KVBM support
122117
123-
Example commands:
124-
cargo build --locked --profile dev # Build Rust project in $CARGO_TARGET_DIR
125-
cd lib/bindings/python && maturin develop --uv # Update Python bindings (if you changed them)
126-
cargo fmt && cargo clippy # Format and lint code before committing
127-
cargo doc --no-deps # Generate documentation
128-
uv pip install -e . # Install various Python packages Dynamo depends on
118+
If cargo build fails with a Cargo.lock error, try to update it with 'cargo update'
119+
========================================
129120
EOF

.devcontainer/sglang/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"SPDX-License-Identifier: Apache-2.0"
99
],
1010
"name": "Dynamo SGLANG Dev Container",
11-
"remoteUser": "ubuntu", // Matches our container user
11+
"remoteUser": "dynamo", // Matches our container user
1212
"updateRemoteUserUID": true, // Updates the UID of the remote user to match the host user, avoids permission errors
1313
"image": "dynamo:latest-sglang-local-dev", // Use the latest SGLANG dev image
1414
"runArgs": [
@@ -71,11 +71,11 @@
7171
},
7272
"mounts": [
7373
// These are for convenience, so that the history and pre-commit cache are persisted between sessions
74-
"source=dynamo-bashhistory,target=/home/ubuntu/.commandhistory,type=volume",
75-
"source=dynamo-precommit-cache,target=/home/ubuntu/.cache/pre-commit,type=volume",
74+
"source=dynamo-bashhistory,target=/home/dynamo/.commandhistory,type=volume",
75+
"source=dynamo-precommit-cache,target=/home/dynamo/.cache/pre-commit,type=volume",
7676
// Default mounts
7777
"source=/tmp/,target=/tmp/,type=bind"
7878
// Uncomment this to reuse your Hugging Face cache
79-
//"source=${localEnv:HOME}/.cache/huggingface,target=/home/ubuntu/.cache/huggingface,type=bind"
79+
//"source=${localEnv:HOME}/.cache/huggingface,target=/home/dynamo/.cache/huggingface,type=bind"
8080
]
8181
}

.devcontainer/trtllm/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"SPDX-License-Identifier: Apache-2.0"
99
],
1010
"name": "Dynamo TRTLLM Dev Container",
11-
"remoteUser": "ubuntu", // Matches our container user
11+
"remoteUser": "dynamo", // Matches our container user
1212
"updateRemoteUserUID": true, // Updates the UID of the remote user to match the host user, avoids permission errors
1313
"image": "dynamo:latest-trtllm-local-dev", // Use the latest TRTLLM dev image
1414
"runArgs": [
@@ -71,11 +71,11 @@
7171
},
7272
"mounts": [
7373
// These are for convenience, so that the history and pre-commit cache are persisted between sessions
74-
"source=dynamo-bashhistory,target=/home/ubuntu/.commandhistory,type=volume",
75-
"source=dynamo-precommit-cache,target=/home/ubuntu/.cache/pre-commit,type=volume",
74+
"source=dynamo-bashhistory,target=/home/dynamo/.commandhistory,type=volume",
75+
"source=dynamo-precommit-cache,target=/home/dynamo/.cache/pre-commit,type=volume",
7676
// Default mounts
7777
"source=/tmp/,target=/tmp/,type=bind"
7878
// Uncomment this to reuse your Hugging Face cache
79-
//"source=${localEnv:HOME}/.cache/huggingface,target=/home/ubuntu/.cache/huggingface,type=bind"
79+
//"source=${localEnv:HOME}/.cache/huggingface,target=/home/dynamo/.cache/huggingface,type=bind"
8080
]
8181
}

.devcontainer/vllm/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"SPDX-License-Identifier: Apache-2.0"
99
],
1010
"name": "Dynamo VLLM Dev Container",
11-
"remoteUser": "ubuntu", // Matches our container user
11+
"remoteUser": "dynamo", // Matches our container user
1212
"updateRemoteUserUID": true, // Updates the UID of the remote user to match the host user, avoids permission errors
1313
"image": "dynamo:latest-vllm-local-dev", // Use the latest VLLM dev image
1414
"runArgs": [
@@ -71,11 +71,11 @@
7171
},
7272
"mounts": [
7373
// These are for convenience, so that the history and pre-commit cache are persisted between sessions
74-
"source=dynamo-bashhistory,target=/home/ubuntu/.commandhistory,type=volume",
75-
"source=dynamo-precommit-cache,target=/home/ubuntu/.cache/pre-commit,type=volume",
74+
"source=dynamo-bashhistory,target=/home/dynamo/.commandhistory,type=volume",
75+
"source=dynamo-precommit-cache,target=/home/dynamo/.cache/pre-commit,type=volume",
7676
// Default mounts
7777
"source=/tmp/,target=/tmp/,type=bind"
7878
// Uncomment this to reuse your Hugging Face cache
79-
//"source=${localEnv:HOME}/.cache/huggingface,target=/home/ubuntu/.cache/huggingface,type=bind"
79+
//"source=${localEnv:HOME}/.cache/huggingface,target=/home/dynamo/.cache/huggingface,type=bind"
8080
]
8181
}

.github/actions/docker-build/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ runs:
174174
175175
# Create job-specific metrics file
176176
mkdir -p build-metrics
177-
METRICS_FILE="build-metrics/metrics-${{ inputs.framework }}-${PLATFORM_ARCH}.json"
177+
METRICS_FILE="build-metrics/metrics-${{ inputs.framework }}-${PLATFORM_ARCH}-${{ github.run_id }}-${{ job.check_run_id }}.json"
178178
179179
# Create the job metrics file directly
180180
cat > "$METRICS_FILE" << EOF
@@ -199,6 +199,6 @@ runs:
199199
- name: Upload Build Metrics
200200
uses: actions/upload-artifact@v4
201201
with:
202-
name: build-metrics-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}
203-
path: build-metrics/metrics-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}.json
202+
name: build-metrics-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}-${{ github.run_id }}-${{ job.check_run_id }}
203+
path: build-metrics/metrics-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}-${{ github.run_id }}-${{ job.check_run_id }}.json
204204
retention-days: 7

.github/filters.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ vllm: &vllm
3535

3636
sglang: &sglang
3737
- 'container/Dockerfile.sglang'
38-
- 'container/Dockerfile.sglang-wideep'
3938
- 'examples/backends/sglang/**'
4039
- 'components/src/dynamo/sglang/**'
4140
- 'container/build.sh'

0 commit comments

Comments
 (0)