Repository navigation
Expand file tree
/
Copy pathdevcontainer.json
More file actions
executable file
·143 lines (137 loc) · 7.52 KB
/
Copy pathdevcontainer.json
File metadata and controls
executable file
·143 lines (137 loc) · 7.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "physical-ai-toolchain-devcontainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile",
"args": {
"NPM_CONFIG_REGISTRY": "${localEnv:NPM_CONFIG_REGISTRY}",
"PIP_INDEX_URL": "${localEnv:PIP_INDEX_URL}",
"UV_DEFAULT_INDEX": "${localEnv:UV_DEFAULT_INDEX}"
}
},
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/azure-cli:1": {
"extensions": "connectedk8s,k8s-extension,azure-iot-ops,amg,eventgrid,ml"
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/devcontainers/features/terraform:1": {
"version": "1.16.2",
"installTerraformDocs": true
},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
// "version": "latest" uses https://dl.k8s.io/release/stable.txt which experiences outages during heavy load.
// Update this back to "latest" or continue to upgrade the version periodically.
"version": "1.33.2",
"helm": "latest",
"minikube": "none"
},
"ghcr.io/rio/features/k9s:1": {},
"ghcr.io/devcontainers/features/powershell:1": {}
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
}
}
},
"extensions": [
"charliermarsh.ruff",
"darkriszty.markdown-table-prettify",
"DavidAnson.vscode-markdownlint",
"eamodio.gitlens",
"EditorConfig.EditorConfig",
"foxundermoon.shell-format",
"GitHub.vscode-pull-request-github",
"hashicorp.terraform",
"ms-azuretools.vscode-azureterraform",
"ms-azuretools.vscode-docker",
"ms-python.debugpy",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode-remote.vscode-remote-extensionpack",
"ms-vscode.azurecli",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-cspell-bundled-dictionaries",
"timonwong.shellcheck",
"yzhang.markdown-all-in-one",
"ms-azuretools.vscode-azure-github-copilot",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"github.vscode-github-actions",
"bierner.markdown-mermaid",
"ms-azuretools.vscode-azurefunctions",
"ms-azuretools.vscode-azureresourcegroups",
"ms-azuretools.vscode-containers",
"tamasfe.even-better-toml",
"redhat.vscode-yaml",
"ms-toolsai.vscode-ai",
"GitHub.copilot@prerelease",
"GitHub.copilot-chat@prerelease",
"ise-hve-essentials.hve-core-all"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [5173, 8000, 8080],
"portsAttributes": {
"5173": {
"label": "Dataviewer frontend"
},
"8000": {
"label": "Dataviewer backend"
}
},
// GPU device nodes are group-restricted: /dev/nvmap is root:video and
// /dev/dri/renderD* is root:render (GID 993 here). CUDA initialization fails
// with error 801 unless the container user holds both; adjust 993 if the host
// render group differs. "gpu": "optional" attaches devices when present and
// still builds on GPU-less hosts.
"runArgs": [
"--group-add",
"video",
"--group-add",
"993"
],
"hostRequirements": {
"gpu": "optional"
},
// Container environment variables
"containerEnv": {
"BROWSER": "code --new-window",
"UV_LINK_MODE": "copy",
"NVIDIA_VISIBLE_DEVICES": "all",
"NVIDIA_DRIVER_CAPABILITIES": "all"
},
"onCreateCommand": {
"setup-dev": "./setup-dev.sh --disable-venv",
"npm-install": "npm ci",
"apt": "sudo apt update && sudo apt install -y shellcheck jq unzip ffmpeg postgresql-client redis-tools",
"tflint": "TFLINT_VERSION=v0.64.0 && case \"$(uname -m)\" in x86_64) TFLINT_ARCH=amd64; TFLINT_SHA256=cca9d13e2e1d7a2c627af60ff899a3c9b74212899416aeb96ec764d2ef954537 ;; aarch64|arm64) TFLINT_ARCH=arm64; TFLINT_SHA256=560da89aacf59389d4eb029730dd5b109b7288096c32f2726a0d9e783a5ea8eb ;; *) echo \"Unsupported arch: $(uname -m)\" >&2; exit 1 ;; esac && curl -fsSL \"https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION}/tflint_linux_${TFLINT_ARCH}.zip\" -o /tmp/tflint.zip && echo \"${TFLINT_SHA256} /tmp/tflint.zip\" | sha256sum -c --quiet - && sudo unzip -o /tmp/tflint.zip -d /usr/local/bin && rm /tmp/tflint.zip && tflint --init",
"actionlint": "ACTIONLINT_VERSION=1.7.12 ./scripts/setup/install-actionlint.sh",
"golangci-lint": "GOLANGCI_LINT_VERSION=2.13.2 && case \"$(uname -m)\" in x86_64) GOLANGCI_LINT_ARCH=amd64; GOLANGCI_LINT_SHA256=2277d43b98ec0054280f2ac26b53268bae97682444678a59a657dd565da021d6 ;; aarch64|arm64) GOLANGCI_LINT_ARCH=arm64; GOLANGCI_LINT_SHA256=a2a4e0065aa41be71f7c5ac90f271b61751331e5d04314e62afe4027855f0893 ;; *) echo \"Unsupported arch: $(uname -m)\" >&2; exit 1 ;; esac && curl -fsSL \"https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-${GOLANGCI_LINT_ARCH}.tar.gz\" -o /tmp/golangci-lint.tar.gz && echo \"${GOLANGCI_LINT_SHA256} /tmp/golangci-lint.tar.gz\" | sha256sum -c --quiet - && sudo tar -xzf /tmp/golangci-lint.tar.gz -C /usr/local/bin --strip-components=1 \"golangci-lint-${GOLANGCI_LINT_VERSION}-linux-${GOLANGCI_LINT_ARCH}/golangci-lint\" && rm /tmp/golangci-lint.tar.gz",
"update-bashrc": "echo 'export PATH=\"${containerWorkspaceFolder}/scripts:${containerWorkspaceFolder}/node_modules/.bin:$PATH\"' | sudo tee -a ~/.bashrc",
"osmo-cli": "OSMO_VERSION=6.3.1 && case \"$(uname -m)\" in x86_64) OSMO_ARCH=x86_64; OSMO_INSTALLER_SHA256=21d9622634ee3f854c90682ca93f618e624603c22be646338199a0a01f94dd6f ;; aarch64|arm64) OSMO_ARCH=arm64; OSMO_INSTALLER_SHA256=ca3ffc0e31b0e6f67af2a5b4822552738d0429c7279e58d797640964b740ed0b ;; *) echo \"Unsupported arch: $(uname -m)\" >&2; exit 1 ;; esac && curl -fsSL \"https://github.com/NVIDIA/OSMO/releases/download/${OSMO_VERSION}/osmo-client-installer-${OSMO_VERSION}-linux-${OSMO_ARCH}.sh\" -o /tmp/osmo_install.sh && echo \"${OSMO_INSTALLER_SHA256} /tmp/osmo_install.sh\" | sha256sum -c --quiet - && sudo bash /tmp/osmo_install.sh && rm /tmp/osmo_install.sh",
"ngc-cli": "if [ \"$(uname -m)\" != \"x86_64\" ]; then echo \"Skipping ngc-cli: no $(uname -m) build available (x86_64 only)\"; exit 0; fi && NGC_CLI_VERSION=3.41.4 && NGC_CLI_SHA256=2c86681048ab8e2980bdd6aa6c17f086eff988276ad90a28f1307b69fdb50252 && curl -fsSL \"https://api.ngc.nvidia.com/v2/resources/nvidia/ngc-apps/ngc_cli/versions/${NGC_CLI_VERSION}/files/ngccli_linux.zip\" -o /tmp/ngccli.zip && echo \"${NGC_CLI_SHA256} /tmp/ngccli.zip\" | sha256sum -c --quiet - && sudo unzip -o /tmp/ngccli.zip -d /usr/local && rm /tmp/ngccli.zip && sudo chmod u+x /usr/local/ngc-cli/ngc && sudo ln -sf /usr/local/ngc-cli/ngc /usr/local/bin/ngc",
"az-ml": "az extension add -n ml --yes || true"
},
// DONT USE 'postCreateCommand', it ruins your global .gitconfig https://github.com/devcontainers/cli/issues/787
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}