devcontainer.json 3.89 KB
Newer Older
1
{
2
    "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
3
    "copyright": [
4
        "SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.",
5
        "SPDX-License-Identifier: Apache-2.0"
6
    ],
7
    "name": "NVIDIA Dynamo Dev Container Development",
8
9
    "remoteUser": "ubuntu", // Matches our container user
    "updateRemoteUserUID": true, // Updates the UID of the remote user to match the host user, avoids permission errors
10
    "image": "dynamo:latest-vllm-dev", // Use the latest VLLM dev image
11
    "runArgs": [
12
13
14
15
16
17
        "--gpus=all",
        "--network=host",
        "--ipc=host",
        "--cap-add=SYS_PTRACE",
        "--shm-size=10G",
        "--ulimit=memlock=-1",
18
        "--ulimit=stack=67108864",
19
        "--ulimit=nofile=65536:65536"
20
21
22
23
24
    ],
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
25
26
                "ms-python.vscode-pylance",
                "rust-lang.rust-analyzer"
27
28
            ],
            "settings": {
29
30
                // Disable automatic copying of .gitconfig to avoid errors
                "dev.containers.copyGitConfig": false,
31
32
33
34
                "terminal.integrated.defaultProfile.linux": "bash",
                "terminal.integrated.cwd": "/home/ubuntu/dynamo",

                "python.defaultInterpreterPath": "/opt/dynamo/venv/bin/python",
35
                "python.linting.enabled": true,
36

37
                "rust-analyzer.memoryLimit": 4096, // larger memory limit to reduce latency
38
39
                "rust-analyzer.checkOnSave.command": "clippy",
                "rust-analyzer.checkOnSave.enable": true,
40
41
42
43
44
45
46
                "rust-analyzer.cargo.buildScripts.enable": true,
                "rust-analyzer.cargo.targetDir": "/home/ubuntu/dynamo/.build/target",
                "rust-analyzer.procMacro.enable": true,
                "rust-analyzer.completion.autoimport.enable": true,

                // Enhanced rust-analyzer configuration
                "rust-analyzer.linkedProjects": [
47
48
49
50
51
52
                    "Cargo.toml",
                    "lib/runtime/Cargo.toml",
                    "lib/llm/Cargo.toml",
                    "lib/tokens/Cargo.toml",
                    "lib/bindings/python/Cargo.toml",
                    "launch/dynamo-run/Cargo.toml"
53
                ],
54
55
                "files.trimTrailingWhitespace": true,
                "files.insertFinalNewline": true
56
57
58
            }
        }
    },
59
    "workspaceFolder": "/home/ubuntu/dynamo",
60
61
62
63
    "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
    "containerEnv": {
64
        "DYNAMO_HOME": "/home/ubuntu/dynamo",
65
        "CARGO_HOME": "/home/ubuntu/dynamo/.build/.cargo",
66
        "RUSTUP_HOME": "/home/ubuntu/dynamo/.build/.rustup",
67
        "CARGO_TARGET_DIR": "/home/ubuntu/dynamo/.build/target"
68
69
    },
    "remoteEnv": {
70
        // Optional convenience tokens passed from host. SSH agent is forwarded via your IDE setting, not here by default.
71
72
        "GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}",
        "HF_TOKEN": "${localEnv:HF_TOKEN}"
73
        // "SSH_AUTH_SOCK": "${env:SSH_AUTH_SOCK}" // Optional: only if you also bind-mount the socket path
74
75
    },
    "mounts": [
76
77
78
        // These are for convenience, so that the history and pre-commit cache are persisted between sessions
        "source=dynamo-bashhistory,target=/home/ubuntu/.commandhistory,type=volume",
        "source=dynamo-precommit-cache,target=/home/ubuntu/.cache/pre-commit,type=volume",
79
        // Default mounts
80
81
82
        "source=/tmp/,target=/tmp/,type=bind"
        // Uncomment this to reuse your Hugging Face cache
        //"source=${localEnv:HOME}/.cache/huggingface,target=/home/ubuntu/.cache/huggingface,type=bind"
83
84
    ]
}