devcontainer.json 4.34 KB
Newer Older
1
2
3
{
    "$schema": "https://json-schema.org/draft-07/schema#",
    "copyright": [
4
5
6
7
8
9
10
11
12
13
14
        "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."
15
    ],
16
    "name": "NVIDIA Dynamo Dev Container Development",
17
18
19
    "remoteUser": "ubuntu", // Matches our container user
    "updateRemoteUserUID": true, // Updates the UID of the remote user to match the host user, avoids permission errors
    "image": "dynamo:latest-vllm-local-dev", // Use the latest VLLM local dev image
20
    "runArgs": [
21
22
23
24
25
26
        "--gpus=all",
        "--network=host",
        "--ipc=host",
        "--cap-add=SYS_PTRACE",
        "--shm-size=10G",
        "--ulimit=memlock=-1",
27
        "--ulimit=stack=67108864",
28
        "--ulimit=nofile=65536:65536"
29
    ],
30
    "service": "dynamo",
31
32
33
34
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
35
36
                "ms-python.vscode-pylance",
                "rust-lang.rust-analyzer"
37
38
            ],
            "settings": {
39
40
                // Disable automatic copying of .gitconfig to avoid errors
                "dev.containers.copyGitConfig": false,
41
42
43
44
                "terminal.integrated.defaultProfile.linux": "bash",
                "terminal.integrated.cwd": "/home/ubuntu/dynamo",

                "python.defaultInterpreterPath": "/opt/dynamo/venv/bin/python",
45
                "python.linting.enabled": true,
46

47
                "rust-analyzer.memoryLimit": 4096, // larger memory limit to reduce latency
48
49
                "rust-analyzer.checkOnSave.command": "clippy",
                "rust-analyzer.checkOnSave.enable": true,
50
51
52
53
54
55
56
                "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": [
57
58
59
60
61
62
                    "Cargo.toml",
                    "lib/runtime/Cargo.toml",
                    "lib/llm/Cargo.toml",
                    "lib/tokens/Cargo.toml",
                    "lib/bindings/python/Cargo.toml",
                    "launch/dynamo-run/Cargo.toml"
63
                ],
64
65
                "files.trimTrailingWhitespace": true,
                "files.insertFinalNewline": true
66
67
68
            }
        }
    },
69
    "workspaceFolder": "/home/ubuntu/dynamo",
70
71
72
73
    "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": {
74
        "DYNAMO_HOME": "/home/ubuntu/dynamo",
75
        "CARGO_HOME": "/home/ubuntu/dynamo/.build/.cargo",
76
77
78
79
80
81
82
83
        "RUSTUP_HOME": "/home/ubuntu/dynamo/.build/.rustup",
        "CARGO_TARGET_DIR": "/home/ubuntu/dynamo/.build/target",
    },
    "remoteEnv": {
        // These are optional, but are convenient to have, especially the SSH_AUTH_SOCK.
        "SSH_AUTH_SOCK": "${env:SSH_AUTH_SOCK}",
        "GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}",
        "HF_TOKEN": "${localEnv:HF_TOKEN}"
84
85
    },
    "mounts": [
86
87
88
        // 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",
89
90
        // Default mounts
        "source=/tmp/,target=/tmp/,type=bind",
91
        "source=${localEnv:HOME}/.cache/huggingface,target=/home/ubuntu/.cache/huggingface,type=bind"
92
93
    ]
}