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

                "python.defaultInterpreterPath": "/opt/dynamo/venv/bin/python",
38
                "python.linting.enabled": true,
39

40
                "rust-analyzer.memoryLimit": 4096, // larger memory limit to reduce latency
41
42
                "rust-analyzer.checkOnSave.command": "clippy",
                "rust-analyzer.checkOnSave.enable": true,
43
                "rust-analyzer.cargo.buildScripts.enable": true,
44
                "rust-analyzer.cargo.targetDir": "/workspace/target",
45
46
47
48
49
                "rust-analyzer.procMacro.enable": true,
                "rust-analyzer.completion.autoimport.enable": true,

                // Enhanced rust-analyzer configuration
                "rust-analyzer.linkedProjects": [
50
51
52
53
54
55
                    "Cargo.toml",
                    "lib/runtime/Cargo.toml",
                    "lib/llm/Cargo.toml",
                    "lib/tokens/Cargo.toml",
                    "lib/bindings/python/Cargo.toml",
                    "launch/dynamo-run/Cargo.toml"
56
                ],
57
58
                "files.trimTrailingWhitespace": true,
                "files.insertFinalNewline": true
59
60
61
            }
        }
    },
62
63
    "workspaceFolder": "/workspace",
    "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
64
    "userEnvProbe": "interactiveShell",
65
    "postCreateCommand": "/bin/bash /workspace/.devcontainer/post-create.sh", // Runs cargo build and pip installs packages
66
    "remoteEnv": {
67
        // Optional convenience tokens passed from host. SSH agent is forwarded via your IDE setting, not here by default.
68
69
        "GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}",
        "HF_TOKEN": "${localEnv:HF_TOKEN}"
70
        // "SSH_AUTH_SOCK": "${env:SSH_AUTH_SOCK}" // Optional: only if you also bind-mount the socket path
71
72
    },
    "mounts": [
73
74
75
        // 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",
76
        // Default mounts
77
78
79
        "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"
80
    ]
81
}