"vscode:/vscode.git/clone" did not exist on "2bada0bd116283a4332d951ee2dd6dfdee8983c0"
Unverified Commit 9c4e9950 authored by Keiven C's avatar Keiven C Committed by GitHub
Browse files

feat: add SGLANG devcontainer documentation (#2741)


Co-authored-by: default avatarUbuntu <ubuntu@keivenc-linux.nvidia.com>
parent fee976a2
...@@ -92,10 +92,10 @@ Follow these steps to get your NVIDIA Dynamo development environment up and runn ...@@ -92,10 +92,10 @@ Follow these steps to get your NVIDIA Dynamo development environment up and runn
### Step 1: Build the Development Container Image ### Step 1: Build the Development Container Image
Build `dynamo:latest-vllm-local-dev` from scratch from the source: Build `dynamo:latest-vllm-local-dev` from scratch from the source:
- Note that currently, `local-dev` is only implemented. - Note that currently, `local-dev` is only implemented for `--framework VLLM`.
```bash ```bash
./container/build.sh --target local-dev ./container/build.sh --target local-dev --framework VLLM
``` ```
The container will be built and give certain file permissions to your local uid and gid. The container will be built and give certain file permissions to your local uid and gid.
...@@ -195,13 +195,6 @@ File Structure: ...@@ -195,13 +195,6 @@ File Structure:
- Bash memory preserved between sessions at `/home/ubuntu/.commandhistory` using docker volume `dynamo-bashhistory` - Bash memory preserved between sessions at `/home/ubuntu/.commandhistory` using docker volume `dynamo-bashhistory`
- Precommit preserved between sessions at `/home/ubuntu/.cache/precommit` using docker volume `dynamo-precommit-cache` - Precommit preserved between sessions at `/home/ubuntu/.cache/precommit` using docker volume `dynamo-precommit-cache`
## Customization
Edit `.devcontainer/devcontainer.json` to modify:
- VS Code settings and extensions
- Environment variables
- Container configuration
- Custom Mounts
## Documentation ## Documentation
To look at the docs run: To look at the docs run:
...@@ -243,6 +236,31 @@ cp .devcontainer/devcontainer.json .devcontainer/jensen_dev/devcontainer.json ...@@ -243,6 +236,31 @@ cp .devcontainer/devcontainer.json .devcontainer/jensen_dev/devcontainer.json
Common customizations include additional mounts, environment variables, IDE extensions, and build arguments. When you open a new Dev Container, you can pick from any of the `.devcontainer/<path>/devcontainer.json` files available. Common customizations include additional mounts, environment variables, IDE extensions, and build arguments. When you open a new Dev Container, you can pick from any of the `.devcontainer/<path>/devcontainer.json` files available.
### SGLANG Custom devcontainer.json Configuration (EXPERIMENTAL)
This is experimental. Please update/fix if you encounter problems. For sglang Dev Container, you first need to build `dynamo:latest-sglang-local-dev` image like this (wait about half an hour):
```bash
./container/build.sh --framework SGLANG --target local-dev
```
Then, make a copy of the `devcontainer.json file` to a directory of your choice. For this example, we'll just call it `sglang`:
```bash
mkdir .devcontainer/sglang/
cp -a .devcontainer/devcontainer.json .devcontainer/sglang/
```
Afterwards, edit your `.devcontainer/sglang/devcontainer.json` so that the name and image correspond to SGLANG. Example:
```json
"name": "[sglang] This is my amazing custom Dev Container Development",
...
"image": "dynamo:latest-sglang-local-dev",
```
Now, go to **Dev Containers: Open Folder in Container** and select `[sglang] This is my amazing custom Dev Container Development`. The post-create.sh script should be running.
### SSH Keys for Git Operations ### SSH Keys for Git Operations
If you have ssh-agent running on the host, then `git push` should just work. If not, you may need to set up ssh-agent, or have SSH keys set up inside the container (more hassle). If you have ssh-agent running on the host, then `git push` should just work. If not, you may need to set up ssh-agent, or have SSH keys set up inside the container (more hassle).
......
...@@ -56,6 +56,17 @@ uv pip uninstall --yes ai-dynamo ai-dynamo-runtime 2>/dev/null || true ...@@ -56,6 +56,17 @@ uv pip uninstall --yes ai-dynamo ai-dynamo-runtime 2>/dev/null || true
cargo build --locked --profile dev --features mistralrs cargo build --locked --profile dev --features mistralrs
# install the python bindings # install the python bindings
# Install maturin if not already installed.
# TODO: Uncomment for SGLANG. Right now, the CI team is making a refactor
# to the Dockerfile, so this is a temporary fix.
# if ! command -v maturin &> /dev/null; then
# echo "Installing maturin..."
# retry uv pip install maturin[patchelf]
# else
# echo "maturin is already installed"
# fi
(cd $HOME/dynamo/lib/bindings/python && retry maturin develop) (cd $HOME/dynamo/lib/bindings/python && retry maturin develop)
# installs overall python packages, grabs binaries from .build/target/debug # installs overall python packages, grabs binaries from .build/target/debug
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment