Unverified Commit 12083e9c authored by Keiven C's avatar Keiven C Committed by GitHub
Browse files

docs: update container paths and interactive mode usage in READMEs (#3927)


Signed-off-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
parent 2e241eb5
......@@ -211,7 +211,7 @@ This setup allows you to use Git commands normally within the container without
### Step 5: Wait for Initialization
The container will automatically:
- Mount your local code to `/home/ubuntu/dynamo`
- Mount your local code to `/workspace`
- Run `post-create.sh` to build the project and configure the environment
If `post-create.sh` fails, you can try to debug or [submit](https://github.com/ai-dynamo/dynamo/issues) an issue on GitHub.
......@@ -223,13 +223,13 @@ If `post-create.sh` fails, you can try to debug or [submit](https://github.com/a
If you make changes to Rust code and want to compile, use [cargo build](https://doc.rust-lang.org/cargo/commands/cargo-build.html). This will update Rust binaries such as dynamo-run.
```bash
cd /home/ubuntu/dynamo && cargo build --locked --profile dev
cd /workspace && cargo build --locked --profile dev
```
Verify that builds are in the pre-defined `dynamo/.build/target` and not `dynamo/workspace`:
Verify that builds are in the pre-defined `target` directory:
```bash
$ cargo metadata --format-version=1 | jq -r '.target_directory'
/home/ubuntu/dynamo/.build/target <-- this is the target path
/workspace/target <-- this is the target path
```
If cargo is not installed and configured properly, you will see one or more errors, such as the following:
......@@ -244,7 +244,7 @@ Lastly, before pushing code to GitHub, remember to run `cargo fmt` and `cargo cl
If you make changes to Rust code and want to propagate to Python bindings then can use [maturin](https://www.maturin.rs/#usage) (pre-installed). This will update the Python bindings with your new Rust changes.
```bash
cd /home/ubuntu/dynamo/lib/bindings/python && maturin develop
cd /workspace/lib/bindings/python && maturin develop
```
## What's Inside
......@@ -252,14 +252,14 @@ Development Environment:
- Rust and Python toolchains
- GPU acceleration
- VS Code or Cursor extensions for Rust and Python
- Persistent build cache in `.build/` directory enables fast incremental builds (only changed files are recompiled) via `cargo build --locked --profile dev`
- Persistent build cache in `target/` directory enables fast incremental builds (only changed files are recompiled) via `cargo build --locked --profile dev`
- Edits to files are propagated to local repo due to the volume mount
- SSH and GPG agent passthrough orchestrated by devcontainer
File Structure:
- Local dynamo repo mounts to `/home/ubuntu/dynamo`
- Local dynamo repo mounts to `/workspace`
- Python venv in `/opt/dynamo/venv`
- Build artifacts in `dynamo/.build/target`
- Build artifacts in `/workspace/target`
- Hugging Face cache preserved between sessions (either mounting your host .cache to the container, or your `HF_HOME` to `/home/ubuntu/.cache/huggingface`)
- 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`
......@@ -268,7 +268,7 @@ File Structure:
To look at the docs run:
```bash
cd ~/dynamo/.build/target/doc && python3 -m http.server 8000
cd /workspace/target/doc && python3 -m http.server 8000
```
VSCode will automatically port-forward and you can check them out in your browser.
......@@ -376,7 +376,7 @@ If you encounter build errors or strange compilation issues, try running `cargo
If `cargo clean` doesn't resolve the issue, it is possible that some of the files were created by root (using the `run.sh` script). You can manually remove the build target by going to your host (outside the container), and remove the target:
```bash
sudo rm -rf <your dynamo path on the host machine>/.build/target
sudo rm -rf <your dynamo path on the host machine>/target
```
### Volume Corruption Issues
......
......@@ -113,7 +113,7 @@ The Python venv ownership is also updated via rsync in local-dev to match the us
## Usage Guidelines
- **Use dev + `run.sh`**: for command-line testing. Runs as root user
- **Use local-dev + `run.sh`**: for command-line development and Docker mounted partitions using your local user ID
- **Use local-dev + `run.sh`**: for command-line development and Docker mounted partitions using your local user ID. Add `-it` flag for interactive sessions
- **Use local-dev + Dev Container**: VS Code/Cursor Dev Container Plugin, using your local user ID
## Example Commands
......@@ -208,14 +208,15 @@ The `run.sh` script launches Docker containers with the appropriate configuratio
- **User Management**: Root or user-based container execution
- **Network Configuration**: Configurable networking modes (host, bridge, none, container sharing)
- **Resource Limits**: Memory, file descriptors, and IPC configuration
- **Interactive Mode**: Use `-it` flag for interactive terminal sessions (required for shells, debugging, and interactive development)
**Common Usage Examples:**
```bash
# Basic container launch (inference/production, runs as root user)
# Basic container launch (inference/production, runs as root user, non-interactive)
./run.sh --image dynamo:latest-vllm -v $HOME/.cache:/home/ubuntu/.cache
# Mount workspace for development (use local-dev image for local host user permissions)
# Interactive development with workspace mounted (use -it for interactive terminal)
./run.sh --image dynamo:latest-vllm-local-dev --mount-workspace -it -v $HOME/.cache:/home/ubuntu/.cache
# Use specific image and framework for development
......@@ -254,8 +255,8 @@ The `run.sh` script supports different networking modes via the `--network` flag
#### Bridge Networking (Isolated)
```bash
# CI/testing with isolated bridge networking and host cache sharing
./run.sh --image dynamo:latest-vllm --mount-workspace -it --network bridge -v $HOME/.cache:/home/ubuntu/.cache
# CI/testing with isolated bridge networking and host cache sharing (no -it for automated CI)
./run.sh --image dynamo:latest-vllm --mount-workspace --network bridge -v $HOME/.cache:/home/ubuntu/.cache
```
**Use cases:**
- Secure isolation from host network
......@@ -345,8 +346,8 @@ python -m dynamo.vllm --model Qwen/Qwen3-0.6B --gpu-memory-utilization 0.20 &
# 1. Build image for CI
./build.sh --framework vllm --no-cache
# 2. Run tests with network isolation for reproducible results
./run.sh --image dynamo:latest-vllm --mount-workspace -it --network bridge -v $HOME/.cache:/home/ubuntu/.cache -- python -m pytest tests/
# 2. Run tests with network isolation for reproducible results (no -it needed for CI)
./run.sh --image dynamo:latest-vllm --mount-workspace --network bridge -v $HOME/.cache:/home/ubuntu/.cache -- python -m pytest tests/
# 3. Inside the container with bridge networking, start services
# Note: Services are only accessible from the same container - no port conflicts with host
......
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