container-superposition 0.1.6 â 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/init.js +7 -4
- package/dist/scripts/init.js.map +1 -1
- package/dist/tool/commands/adopt.d.ts.map +1 -1
- package/dist/tool/commands/adopt.js +1 -27
- package/dist/tool/commands/adopt.js.map +1 -1
- package/dist/tool/commands/doctor.d.ts +3 -0
- package/dist/tool/commands/doctor.d.ts.map +1 -1
- package/dist/tool/commands/doctor.js +932 -69
- package/dist/tool/commands/doctor.js.map +1 -1
- package/dist/tool/commands/explain.d.ts.map +1 -1
- package/dist/tool/commands/explain.js +9 -0
- package/dist/tool/commands/explain.js.map +1 -1
- package/dist/tool/questionnaire/composer.d.ts.map +1 -1
- package/dist/tool/questionnaire/composer.js +212 -11
- package/dist/tool/questionnaire/composer.js.map +1 -1
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -1
- package/dist/tool/schema/overlay-loader.js +1 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -1
- package/dist/tool/schema/project-config.d.ts +1 -1
- package/dist/tool/schema/project-config.d.ts.map +1 -1
- package/dist/tool/schema/project-config.js +94 -25
- package/dist/tool/schema/project-config.js.map +1 -1
- package/dist/tool/schema/types.d.ts +85 -11
- package/dist/tool/schema/types.d.ts.map +1 -1
- package/dist/tool/utils/merge.d.ts.map +1 -1
- package/dist/tool/utils/merge.js +9 -0
- package/dist/tool/utils/merge.js.map +1 -1
- package/docs/creating-overlays.md +151 -2
- package/docs/overlay-imports.md +125 -102
- package/docs/overlays.md +49 -6
- package/docs/quick-reference.md +99 -0
- package/docs/specs/003-mkdocs2-overlay/spec.md +114 -0
- package/docs/specs/004-doctor-fix/spec.md +70 -0
- package/docs/specs/005-cuda-overlay/spec.md +101 -0
- package/docs/specs/006-rocm-overlay/spec.md +109 -0
- package/overlays/.shared/README.md +80 -21
- package/overlays/.shared/compose/common-healthchecks.md +60 -0
- package/overlays/.shared/vscode/recommended-extensions.json +15 -11
- package/overlays/alertmanager/setup.sh +4 -19
- package/overlays/alertmanager/verify.sh +8 -9
- package/overlays/all/README.md +43 -0
- package/overlays/all/devcontainer.patch.json +6 -0
- package/overlays/all/overlay.yml +14 -0
- package/overlays/amp/setup.sh +5 -0
- package/overlays/bun/setup.sh +10 -1
- package/overlays/bun/verify.sh +6 -1
- package/overlays/claude-code/setup.sh +5 -0
- package/overlays/cloudflared/setup.sh +9 -12
- package/overlays/codex/README.md +9 -6
- package/overlays/codex/devcontainer.patch.json +7 -1
- package/overlays/codex/setup.sh +5 -0
- package/overlays/codex/verify.sh +8 -0
- package/overlays/commitlint/setup.sh +5 -0
- package/overlays/cuda/README.md +179 -0
- package/overlays/cuda/devcontainer.patch.json +7 -0
- package/overlays/cuda/overlay.yml +17 -0
- package/overlays/cuda/setup.sh +32 -0
- package/overlays/cuda/verify.sh +38 -0
- package/overlays/devcontainer-cli/README.md +50 -0
- package/overlays/devcontainer-cli/devcontainer.patch.json +13 -0
- package/overlays/devcontainer-cli/overlay.yml +16 -0
- package/overlays/devcontainer-cli/setup.sh +14 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/setup.sh +7 -6
- package/overlays/dotnet/setup.sh +14 -7
- package/overlays/duckdb/devcontainer.patch.json +1 -2
- package/overlays/gcloud/devcontainer.patch.json +0 -6
- package/overlays/gcloud/setup.sh +51 -0
- package/overlays/gemini-cli/setup.sh +5 -0
- package/overlays/git-helpers/devcontainer.patch.json +2 -1
- package/overlays/go/setup.sh +15 -14
- package/overlays/jaeger/overlay.yml +2 -0
- package/overlays/just/setup.sh +5 -17
- package/overlays/keycloak/docker-compose.yml +6 -4
- package/overlays/keycloak/verify.sh +4 -3
- package/overlays/kind/devcontainer.patch.json +1 -2
- package/overlays/kind/setup.sh +8 -17
- package/overlays/minio/setup.sh +10 -18
- package/overlays/mkdocs/overlay.yml +2 -1
- package/overlays/mkdocs2/README.md +135 -0
- package/overlays/mkdocs2/devcontainer.patch.json +19 -0
- package/overlays/mkdocs2/overlay.yml +17 -0
- package/overlays/mkdocs2/setup.sh +67 -0
- package/overlays/mkdocs2/verify.sh +35 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +7 -1
- package/overlays/modern-cli-tools/setup.sh +21 -71
- package/overlays/mongodb/devcontainer.patch.json +0 -6
- package/overlays/mongodb/setup.sh +59 -0
- package/overlays/mysql/verify.sh +4 -3
- package/overlays/nats/.env.example +1 -1
- package/overlays/nats/README.md +1 -1
- package/overlays/nats/docker-compose.yml +1 -1
- package/overlays/ngrok/setup.sh +9 -6
- package/overlays/nodejs/setup.sh +5 -0
- package/overlays/openapi-tools/devcontainer.patch.json +1 -2
- package/overlays/openapi-tools/setup.sh +9 -8
- package/overlays/opencode/setup.sh +5 -0
- package/overlays/otel-collector/overlay.yml +2 -0
- package/overlays/otel-collector/setup.sh +3 -16
- package/overlays/otel-demo-nodejs/verify.sh +8 -9
- package/overlays/otel-demo-python/verify.sh +16 -10
- package/overlays/pandoc/README.md +22 -15
- package/overlays/pandoc/devcontainer.patch.json +6 -2
- package/overlays/pandoc/setup.sh +217 -18
- package/overlays/pandoc/verify.sh +16 -4
- package/overlays/playwright/devcontainer.patch.json +3 -1
- package/overlays/playwright/setup.sh +37 -0
- package/overlays/postgres/docker-compose.yml +6 -0
- package/overlays/powershell/setup.sh +49 -13
- package/overlays/pre-commit/setup.sh +12 -3
- package/overlays/prometheus/overlay.yml +2 -0
- package/overlays/promtail/verify.sh +16 -10
- package/overlays/pulumi/devcontainer.patch.json +1 -1
- package/overlays/python/setup.sh +28 -9
- package/overlays/python/verify.sh +4 -2
- package/overlays/redpanda/docker-compose.yml +3 -5
- package/overlays/rocm/README.md +227 -0
- package/overlays/rocm/devcontainer.patch.json +4 -0
- package/overlays/rocm/overlay.yml +17 -0
- package/overlays/rocm/setup.sh +45 -0
- package/overlays/rocm/verify.sh +47 -0
- package/overlays/rust/setup.sh +11 -18
- package/overlays/spec-kit/setup.sh +7 -3
- package/overlays/sqlite/setup.sh +14 -14
- package/overlays/sqlserver/docker-compose.yml +3 -3
- package/overlays/sqlserver/verify.sh +22 -5
- package/overlays/tempo/verify.sh +16 -10
- package/overlays/tilt/devcontainer.patch.json +1 -2
- package/overlays/tilt/setup.sh +14 -4
- package/overlays/windsurf-cli/setup.sh +27 -4
- package/overlays/windsurf-cli/verify.sh +13 -3
- package/package.json +2 -1
- package/templates/scripts/setup-utils.sh +228 -0
- package/tool/schema/config.schema.json +110 -8
- package/tool/schema/overlay-manifest.schema.json +5 -0
- package/overlays/.shared/compose/common-healthchecks.yml +0 -38
- /package/overlays/otel-demo-nodejs/{Dockerfile-otel-demo-nodejs â Dockerfile} +0 -0
- /package/overlays/otel-demo-nodejs/{package-otel-demo-nodejs.json â package.json} +0 -0
- /package/overlays/otel-demo-nodejs/{server-otel-demo-nodejs.js â server.js} +0 -0
- /package/overlays/otel-demo-nodejs/{tracing-otel-demo-nodejs.js â tracing.js} +0 -0
- /package/overlays/otel-demo-python/{Dockerfile-otel-demo-python â Dockerfile} +0 -0
- /package/overlays/otel-demo-python/{app-otel-demo-python.py â app.py} +0 -0
- /package/overlays/otel-demo-python/{requirements-otel-demo-python.txt â requirements.txt} +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# ROCm (AMD GPU) Overlay
|
|
2
|
+
|
|
3
|
+
Enables AMD GPU passthrough for containerized ML, inference, and ROCm compute workloads.
|
|
4
|
+
|
|
5
|
+
> â ī¸ **ROCm-in-container is more fragile than CUDA.** It depends heavily on the host kernel version, AMD driver stack, specific device support, and container runtime configuration. Treat this as a separate supported profile â not a drop-in equivalent of CUDA.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **AMD GPU passthrough** - Device flags added to container `runArgs` so host AMD GPUs are accessible
|
|
10
|
+
- **Group membership** - `--group-add=video` and `--group-add=render` ensure the container user can access GPU device nodes
|
|
11
|
+
- **Setup check** - `setup.sh` verifies `rocm-smi` / `rocminfo` on container start and prints actionable guidance when GPU access is unavailable
|
|
12
|
+
- **Doctor integration** - `verify.sh` asserts `rocm-smi` exits 0 for `container-superposition doctor` checks
|
|
13
|
+
|
|
14
|
+
## Prerequisites (host-side â out of scope for this overlay)
|
|
15
|
+
|
|
16
|
+
This overlay configures the _container_ side of GPU passthrough. The host must be prepared independently:
|
|
17
|
+
|
|
18
|
+
1. **Supported AMD GPU** â RDNA 2+ or most CDNA GPUs. Check the [ROCm hardware compatibility matrix](https://rocm.docs.amd.com/en/latest/compatibility/compatibility-matrix.html) before proceeding.
|
|
19
|
+
2. **AMD GPU drivers (`amdgpu`)** â Install the driver package for your Linux distribution:
|
|
20
|
+
```bash
|
|
21
|
+
# Example for Ubuntu â use amdgpu-install from AMD's repository
|
|
22
|
+
# https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/amdgpu-install.html
|
|
23
|
+
sudo apt-get install amdgpu-dkms
|
|
24
|
+
```
|
|
25
|
+
3. **ROCm runtime** â Install on the host (or use a container image that bundles it):
|
|
26
|
+
```bash
|
|
27
|
+
# Example for Ubuntu
|
|
28
|
+
sudo apt-get install rocm
|
|
29
|
+
```
|
|
30
|
+
4. **Group membership** â Add your user to the `render` and `video` groups:
|
|
31
|
+
```bash
|
|
32
|
+
sudo usermod -aG render,video $USER
|
|
33
|
+
# Log out and back in (or reboot) for group changes to take effect
|
|
34
|
+
```
|
|
35
|
+
5. **Device nodes** â Verify `/dev/kfd` and `/dev/dri` exist on the host:
|
|
36
|
+
```bash
|
|
37
|
+
ls -la /dev/kfd /dev/dri/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> â ī¸ **This overlay cannot install or replace host drivers.** Version alignment between the ROCm user-space libraries inside the container and the host kernel module is the user's responsibility.
|
|
41
|
+
|
|
42
|
+
## How It Works
|
|
43
|
+
|
|
44
|
+
The overlay patches `devcontainer.json` with:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"runArgs": ["--device=/dev/kfd", "--device=/dev/dri", "--group-add=video", "--group-add=render"]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| Flag | Purpose |
|
|
53
|
+
| -------------------- | ----------------------------------------------------------------- |
|
|
54
|
+
| `--device=/dev/kfd` | AMD Kernel Fusion Driver; required for ROCm compute |
|
|
55
|
+
| `--device=/dev/dri` | Direct Rendering Infrastructure; gives access to GPU render nodes |
|
|
56
|
+
| `--group-add=video` | Adds the container user to the `video` group (owns `/dev/dri`) |
|
|
57
|
+
| `--group-add=render` | Adds the container user to the `render` group (owns `/dev/kfd`) |
|
|
58
|
+
|
|
59
|
+
The container image itself must include ROCm user-space libraries (e.g., `libamdhip64`) to use ROCm APIs. See [Base Image](#base-image) below.
|
|
60
|
+
|
|
61
|
+
## Base Image
|
|
62
|
+
|
|
63
|
+
For ROCm workloads you typically want a ROCm-capable base image. Popular choices:
|
|
64
|
+
|
|
65
|
+
| Image | Use case |
|
|
66
|
+
| ----------------------- | ------------------------------------ |
|
|
67
|
+
| `rocm/dev-ubuntu-22.04` | Ubuntu 22.04 with ROCm pre-installed |
|
|
68
|
+
| `rocm/dev-ubuntu-24.04` | Ubuntu 24.04 with ROCm pre-installed |
|
|
69
|
+
| `rocm/pytorch` | PyTorch with ROCm support |
|
|
70
|
+
| `rocm/tensorflow` | TensorFlow with ROCm support |
|
|
71
|
+
|
|
72
|
+
Browse all official ROCm images at [hub.docker.com/u/rocm](https://hub.docker.com/u/rocm).
|
|
73
|
+
|
|
74
|
+
To use a ROCm image, set the `image` field in your `.devcontainer/devcontainer.json` (for plain stack) or configure the appropriate service's `image` in your compose-based devcontainer setup (for compose stack).
|
|
75
|
+
|
|
76
|
+
## Common Commands
|
|
77
|
+
|
|
78
|
+
### Check GPU availability
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Show GPU product name and status
|
|
82
|
+
rocm-smi --showproductname
|
|
83
|
+
|
|
84
|
+
# Show all GPU information
|
|
85
|
+
rocm-smi
|
|
86
|
+
|
|
87
|
+
# Show GPU utilisation
|
|
88
|
+
rocm-smi --showuse
|
|
89
|
+
|
|
90
|
+
# List all HSA (Heterogeneous System Architecture) agents
|
|
91
|
+
rocminfo
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Discover device nodes
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# List DRI render nodes on the host
|
|
98
|
+
ls -la /dev/dri/
|
|
99
|
+
|
|
100
|
+
# Show GPU device details
|
|
101
|
+
rocm-smi --showbus
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Query ROCm version
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# ROCm version
|
|
108
|
+
cat /opt/rocm/.info/version 2>/dev/null || rocminfo | grep -i 'rocm\|version' | head -n5
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Python / PyTorch ROCm smoke test
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
import torch
|
|
115
|
+
print(torch.cuda.is_available()) # True (ROCm uses the CUDA compatibility layer)
|
|
116
|
+
print(torch.cuda.get_device_name(0)) # e.g. "AMD Radeon RX 7900 XTX"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
> **Note:** PyTorch ROCm uses `torch.cuda` APIs via the HIP/CUDA compatibility layer. Install the ROCm-specific PyTorch wheel:
|
|
120
|
+
>
|
|
121
|
+
> ```bash
|
|
122
|
+
> pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.0
|
|
123
|
+
> ```
|
|
124
|
+
>
|
|
125
|
+
> Find the correct wheel URL at [pytorch.org/get-started/locally](https://pytorch.org/get-started/locally/).
|
|
126
|
+
|
|
127
|
+
### TensorFlow ROCm smoke test
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
import tensorflow as tf
|
|
131
|
+
print(tf.config.list_physical_devices('GPU'))
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
> Install the ROCm-specific TensorFlow wheel from [tensorflow/rocm releases](https://github.com/ROCm/tensorflow-upstream/releases).
|
|
135
|
+
|
|
136
|
+
## Use Cases
|
|
137
|
+
|
|
138
|
+
- **Model inference** â Run LLM or CV model inference with AMD GPU acceleration
|
|
139
|
+
- **Training** â Train deep learning models without leaving the dev container
|
|
140
|
+
- **ROCm compute** â General-purpose GPU programming with HIP (AMD's CUDA-compatible API)
|
|
141
|
+
- **Jupyter notebooks** â GPU-accelerated data science with Jupyter (combine with the `jupyter` overlay)
|
|
142
|
+
|
|
143
|
+
**Integrates well with:**
|
|
144
|
+
|
|
145
|
+
- `python` â Python runtime for ML workloads
|
|
146
|
+
- `jupyter` â Interactive GPU notebooks
|
|
147
|
+
|
|
148
|
+
## Troubleshooting
|
|
149
|
+
|
|
150
|
+
### `rocm-smi: command not found`
|
|
151
|
+
|
|
152
|
+
The container image does not include the ROCm tools. Either:
|
|
153
|
+
|
|
154
|
+
1. Switch to a ROCm base image (e.g., `rocm/dev-ubuntu-22.04`)
|
|
155
|
+
2. Install ROCm tools inside the image:
|
|
156
|
+
```bash
|
|
157
|
+
sudo apt-get install rocm-smi-lib rocminfo
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### `No AMD GPU detected` / `/dev/kfd not found`
|
|
161
|
+
|
|
162
|
+
The GPU device nodes are not accessible inside the container. Work through this checklist:
|
|
163
|
+
|
|
164
|
+
1. Verify device nodes exist on the **host**:
|
|
165
|
+
```bash
|
|
166
|
+
ls -la /dev/kfd /dev/dri/
|
|
167
|
+
```
|
|
168
|
+
2. Verify the `amdgpu` kernel module is loaded on the host:
|
|
169
|
+
```bash
|
|
170
|
+
lsmod | grep amdgpu
|
|
171
|
+
```
|
|
172
|
+
3. Rebuild the dev container after confirming device nodes exist.
|
|
173
|
+
|
|
174
|
+
### `Permission denied on /dev/kfd`
|
|
175
|
+
|
|
176
|
+
The container user is not in the correct groups. Verify:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Inside the container, check current groups
|
|
180
|
+
id
|
|
181
|
+
|
|
182
|
+
# On the host, add user to groups and re-login
|
|
183
|
+
sudo usermod -aG render,video $USER
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### `ROCm version mismatch`
|
|
187
|
+
|
|
188
|
+
The ROCm user-space library version inside the image does not match the host kernel module version. Solutions:
|
|
189
|
+
|
|
190
|
+
- Use a container image whose ROCm version matches the host ROCm installation
|
|
191
|
+
- Check the host ROCm version: `cat /opt/rocm/.info/version`
|
|
192
|
+
- Use the corresponding `rocm/dev-*` image tag
|
|
193
|
+
|
|
194
|
+
### `--device` flag not recognised
|
|
195
|
+
|
|
196
|
+
Ensure your Docker version is 19.03+ and the Docker daemon can access the host device nodes.
|
|
197
|
+
|
|
198
|
+
### GPU not visible in GitHub Codespaces / cloud dev environments
|
|
199
|
+
|
|
200
|
+
Cloud hosted dev environments (GitHub Codespaces, Gitpod) typically do not provide AMD GPU passthrough. Use a GPU-enabled cloud VM with AMD GPU support and run VS Code Remote SSH.
|
|
201
|
+
|
|
202
|
+
## Known Limitations
|
|
203
|
+
|
|
204
|
+
- ROCm version support is tightly coupled to the host kernel version and AMD driver stack
|
|
205
|
+
- Device node names (`/dev/dri/renderD128`) may differ between hosts; the `--device=/dev/dri` flag passes the entire directory
|
|
206
|
+
- Not all AMD GPU architectures are supported â always consult the [ROCm compatibility matrix](https://rocm.docs.amd.com/en/latest/compatibility/compatibility-matrix.html)
|
|
207
|
+
- Some frameworks (PyTorch, TensorFlow) require separate ROCm-specific wheels â see [Common Commands](#common-commands)
|
|
208
|
+
- ROCm setup is generally less forgiving than CUDA; when in doubt, test `rocm-smi` on the host first
|
|
209
|
+
|
|
210
|
+
## Security Considerations
|
|
211
|
+
|
|
212
|
+
`--device=/dev/kfd` and `--device=/dev/dri` grant the container access to the GPU device nodes. This is appropriate for development but should not be used in untrusted or multi-tenant environments.
|
|
213
|
+
|
|
214
|
+
## References
|
|
215
|
+
|
|
216
|
+
- [ROCm documentation](https://rocm.docs.amd.com/)
|
|
217
|
+
- [ROCm hardware compatibility matrix](https://rocm.docs.amd.com/en/latest/compatibility/compatibility-matrix.html)
|
|
218
|
+
- [ROCm installation guide (Linux)](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/)
|
|
219
|
+
- [ROCm Docker images (hub.docker.com/u/rocm)](https://hub.docker.com/u/rocm)
|
|
220
|
+
- [PyTorch ROCm wheels](https://pytorch.org/get-started/locally/)
|
|
221
|
+
- [TensorFlow ROCm releases](https://github.com/ROCm/tensorflow-upstream/releases)
|
|
222
|
+
|
|
223
|
+
**Related Overlays:**
|
|
224
|
+
|
|
225
|
+
- `python` â Python runtime for ML workloads
|
|
226
|
+
- `jupyter` â GPU-accelerated interactive notebooks
|
|
227
|
+
- `cuda` â NVIDIA GPU passthrough (conflicts with `rocm`)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
id: rocm
|
|
2
|
+
name: ROCm (AMD GPU)
|
|
3
|
+
description: AMD ROCm libraries and GPU passthrough for containerized ML/inference workloads
|
|
4
|
+
category: dev
|
|
5
|
+
supports: []
|
|
6
|
+
requires: []
|
|
7
|
+
suggests: []
|
|
8
|
+
conflicts:
|
|
9
|
+
- cuda
|
|
10
|
+
tags:
|
|
11
|
+
- dev
|
|
12
|
+
- gpu
|
|
13
|
+
- rocm
|
|
14
|
+
- amd
|
|
15
|
+
- ml
|
|
16
|
+
- inference
|
|
17
|
+
ports: []
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# ROCm overlay setup script
|
|
3
|
+
# Checks that rocm-smi / rocminfo is reachable inside the container and prints
|
|
4
|
+
# a helpful message when the host is not configured for AMD GPU passthrough.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
echo "đĨī¸ Setting up ROCm (AMD GPU) overlay..."
|
|
9
|
+
|
|
10
|
+
if rocm-smi --showproductname >/dev/null 2>&1; then
|
|
11
|
+
gpu_name="$(rocm-smi --showproductname 2>/dev/null | grep -i 'card\|gpu\|product' | head -n1)"
|
|
12
|
+
if [ -z "$gpu_name" ]; then
|
|
13
|
+
gpu_name="AMD GPU detected"
|
|
14
|
+
fi
|
|
15
|
+
echo "â rocm-smi found: $gpu_name"
|
|
16
|
+
echo "â ROCm overlay is ready"
|
|
17
|
+
elif rocminfo >/dev/null 2>&1; then
|
|
18
|
+
gpu_name="$(rocminfo 2>/dev/null | grep 'Marketing Name' | head -n1 | sed 's/.*: *//')"
|
|
19
|
+
if [ -z "$gpu_name" ]; then
|
|
20
|
+
gpu_name="AMD GPU detected"
|
|
21
|
+
fi
|
|
22
|
+
echo "â rocminfo found: $gpu_name"
|
|
23
|
+
echo "â ROCm overlay is ready"
|
|
24
|
+
else
|
|
25
|
+
echo ""
|
|
26
|
+
echo "â ī¸ Neither rocm-smi nor rocminfo is functioning inside the container."
|
|
27
|
+
echo ""
|
|
28
|
+
echo " AMD GPU passthrough requires the following on the host:"
|
|
29
|
+
echo " 1. A supported AMD GPU (RDNA 2+ or CDNA â check the compatibility matrix:"
|
|
30
|
+
echo " https://rocm.docs.amd.com/en/latest/compatibility/compatibility-matrix.html)"
|
|
31
|
+
echo " 2. AMD GPU drivers (amdgpu) installed on the host"
|
|
32
|
+
echo " 3. ROCm runtime installed on the host (or bundled in the container image)"
|
|
33
|
+
echo " 4. Your user added to the 'render' and 'video' groups:"
|
|
34
|
+
echo " sudo usermod -aG render,video \$USER"
|
|
35
|
+
echo " 5. /dev/kfd and /dev/dri devices accessible in the container"
|
|
36
|
+
echo ""
|
|
37
|
+
echo " This overlay adds the following to the container's runArgs:"
|
|
38
|
+
echo " --device=/dev/kfd --device=/dev/dri"
|
|
39
|
+
echo " --group-add=video --group-add=render"
|
|
40
|
+
echo " but it cannot install or replace host drivers."
|
|
41
|
+
echo ""
|
|
42
|
+
echo " Once the host is configured, rebuild the dev container."
|
|
43
|
+
echo ""
|
|
44
|
+
echo "âšī¸ ROCm overlay setup complete (rocm-smi not functioning on this host)"
|
|
45
|
+
fi
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Verification script for ROCm overlay
|
|
3
|
+
# Asserts rocm-smi exits 0 (used by the doctor command)
|
|
4
|
+
|
|
5
|
+
# Don't exit on error - we want to report all failures
|
|
6
|
+
ALL_CHECKS_PASSED=true
|
|
7
|
+
|
|
8
|
+
echo "đ Verifying ROCm (AMD GPU) overlay..."
|
|
9
|
+
echo ""
|
|
10
|
+
|
|
11
|
+
echo "1ī¸âŖ Checking rocm-smi..."
|
|
12
|
+
if command -v rocm-smi &> /dev/null; then
|
|
13
|
+
if rocm-smi --showproductname 2>/dev/null; then
|
|
14
|
+
echo " â
rocm-smi is available and AMD GPU is accessible"
|
|
15
|
+
elif rocm-smi 2>/dev/null; then
|
|
16
|
+
echo " â
rocm-smi is available and AMD GPU is accessible"
|
|
17
|
+
else
|
|
18
|
+
echo " â rocm-smi is installed but failed to query GPU information"
|
|
19
|
+
echo ""
|
|
20
|
+
echo " Possible causes:"
|
|
21
|
+
echo " - AMD GPU driver (amdgpu) is not loaded on the host"
|
|
22
|
+
echo " - /dev/kfd or /dev/dri is not accessible in this container"
|
|
23
|
+
echo " - Container user is not in the 'render' or 'video' group"
|
|
24
|
+
echo " - ROCm version mismatch between container image and host kernel"
|
|
25
|
+
echo ""
|
|
26
|
+
echo " Resolve the above issues and retry the ROCm overlay verification."
|
|
27
|
+
ALL_CHECKS_PASSED=false
|
|
28
|
+
fi
|
|
29
|
+
else
|
|
30
|
+
echo " â rocm-smi not found"
|
|
31
|
+
echo ""
|
|
32
|
+
echo " Ensure the host has:"
|
|
33
|
+
echo " - AMD GPU drivers (amdgpu) installed"
|
|
34
|
+
echo " - ROCm runtime installed on the host or bundled in the container image"
|
|
35
|
+
echo " - /dev/kfd and /dev/dri accessible in the container"
|
|
36
|
+
echo " - Container user in the 'render' and 'video' groups"
|
|
37
|
+
ALL_CHECKS_PASSED=false
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
echo ""
|
|
41
|
+
if [ "$ALL_CHECKS_PASSED" = true ]; then
|
|
42
|
+
echo "â
ROCm overlay verification complete"
|
|
43
|
+
exit 0
|
|
44
|
+
else
|
|
45
|
+
echo "â ROCm overlay verification failed"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
package/overlays/rust/setup.sh
CHANGED
|
@@ -3,34 +3,27 @@
|
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
+
# Source shared setup utilities
|
|
7
|
+
# shellcheck source=setup-utils.sh
|
|
8
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
9
|
+
export CARGO_TERM_COLOR=never
|
|
10
|
+
|
|
6
11
|
echo "đ§ Setting up Rust development environment..."
|
|
7
12
|
|
|
8
13
|
# Install common Rust components and tools
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
rustup component add rustfmt || echo "â ī¸ rustfmt already installed"
|
|
13
|
-
|
|
14
|
-
# clippy (Linter)
|
|
15
|
-
rustup component add clippy || echo "â ī¸ clippy already installed"
|
|
16
|
-
|
|
17
|
-
# rust-src (Source code for standard library)
|
|
18
|
-
rustup component add rust-src || echo "â ī¸ rust-src already installed"
|
|
14
|
+
run_spinner "rustfmt component" rustup component add rustfmt
|
|
15
|
+
run_spinner "clippy component" rustup component add clippy
|
|
16
|
+
run_spinner "rust-src component" rustup component add rust-src
|
|
19
17
|
|
|
20
18
|
# Install common cargo tools
|
|
21
19
|
echo "đĻ Installing cargo tools..."
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
cargo install cargo-watch || echo "â ī¸ cargo-watch already installed"
|
|
25
|
-
|
|
26
|
-
# cargo-edit (Manage dependencies from CLI)
|
|
27
|
-
cargo install cargo-edit || echo "â ī¸ cargo-edit already installed"
|
|
20
|
+
run_spinner "cargo-watch" cargo install --quiet cargo-watch
|
|
21
|
+
run_spinner "cargo-edit" cargo install --quiet cargo-edit
|
|
28
22
|
|
|
29
23
|
# Install project dependencies if Cargo.toml exists
|
|
30
24
|
if [ -f "Cargo.toml" ]; then
|
|
31
25
|
echo "đĻ Rust project detected, building dependencies..."
|
|
32
|
-
cargo fetch
|
|
33
|
-
cargo build || echo "â ī¸ cargo build failed or skipped"
|
|
26
|
+
run_spinner "cargo fetch" cargo fetch
|
|
34
27
|
fi
|
|
35
28
|
|
|
36
29
|
echo "â Rust setup complete"
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
+
# Source shared setup utilities (provides run_spinner)
|
|
7
|
+
# shellcheck source=setup-utils.sh
|
|
8
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
9
|
+
|
|
6
10
|
echo "đĻ Installing prerequisites for spec-kit..."
|
|
7
11
|
|
|
8
12
|
# Ensure uv tool bin directory is always on PATH (uv puts shims here regardless
|
|
@@ -21,11 +25,11 @@ echo "đĻ Installing specify-cli..."
|
|
|
21
25
|
# Pin to a uv-managed Python (avoids broken system Python 3.13 on Debian trixie
|
|
22
26
|
# where stdlib modules like shutil/os can be missing due to Debian's split packages)
|
|
23
27
|
UV_PYTHON_VERSION="3.12"
|
|
24
|
-
|
|
25
|
-
uv python install "${UV_PYTHON_VERSION}"
|
|
28
|
+
run_spinner "Python ${UV_PYTHON_VERSION} (uv)" uv python install --quiet "${UV_PYTHON_VERSION}"
|
|
26
29
|
|
|
27
30
|
# Install specify-cli using the uv-managed Python, not the system interpreter
|
|
28
|
-
uv tool install specify-cli
|
|
31
|
+
run_spinner "specify-cli" uv tool install --quiet specify-cli \
|
|
32
|
+
--from git+https://github.com/github/spec-kit.git \
|
|
29
33
|
--python "${UV_PYTHON_VERSION}"
|
|
30
34
|
|
|
31
35
|
# Verify â use the full path as a fallback in case the shim dir is not yet in PATH
|
package/overlays/sqlite/setup.sh
CHANGED
|
@@ -5,20 +5,20 @@ set -e
|
|
|
5
5
|
|
|
6
6
|
echo "đ§ Setting up SQLite tools..."
|
|
7
7
|
|
|
8
|
-
# Install litecli via
|
|
9
|
-
if command -v
|
|
10
|
-
echo "đĻ Installing litecli..."
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
# Install litecli via pipx (avoids --user conflicts inside virtualenvs)
|
|
9
|
+
if command -v pipx &> /dev/null; then
|
|
10
|
+
echo "đĻ Installing litecli via pipx..."
|
|
11
|
+
pipx install litecli || echo "â ī¸ litecli installation failed, continuing..."
|
|
12
|
+
elif command -v pip3 &> /dev/null; then
|
|
13
|
+
echo "đĻ Installing litecli via pip3..."
|
|
14
|
+
pip3 install litecli 2>/dev/null || \
|
|
15
|
+
pip3 install --break-system-packages litecli || \
|
|
16
|
+
echo "â ī¸ litecli installation failed, continuing..."
|
|
17
|
+
elif command -v pip &> /dev/null; then
|
|
18
|
+
echo "đĻ Installing litecli via pip..."
|
|
19
|
+
pip install litecli 2>/dev/null || \
|
|
20
|
+
pip install --break-system-packages litecli || \
|
|
21
|
+
echo "â ī¸ litecli installation failed, continuing..."
|
|
22
22
|
else
|
|
23
23
|
echo "â ī¸ Python/pip not found, skipping litecli installation"
|
|
24
24
|
echo " Install Python overlay for enhanced SQLite CLI (litecli)"
|
|
@@ -18,12 +18,12 @@ services:
|
|
|
18
18
|
test:
|
|
19
19
|
[
|
|
20
20
|
'CMD-SHELL',
|
|
21
|
-
"/opt/mssql-
|
|
21
|
+
"/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P '${MSSQL_SA_PASSWORD:-YourStrong@Passw0rd}' -Q 'SELECT 1' -No || exit 1",
|
|
22
22
|
]
|
|
23
23
|
interval: 10s
|
|
24
24
|
timeout: 5s
|
|
25
|
-
retries:
|
|
26
|
-
start_period:
|
|
25
|
+
retries: 10
|
|
26
|
+
start_period: 60s
|
|
27
27
|
|
|
28
28
|
volumes:
|
|
29
29
|
sqlserver-data:
|
|
@@ -10,10 +10,27 @@ echo ""
|
|
|
10
10
|
# Check if SQL Server service is running
|
|
11
11
|
echo "1ī¸âŖ Checking SQL Server service..."
|
|
12
12
|
SQLSERVER_READY=false
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
MSSQL_SA_PASSWORD="${MSSQL_SA_PASSWORD:-YourStrong@Passw0rd}"
|
|
14
|
+
MSSQL_HOST="${MSSQL_HOST:-sqlserver}"
|
|
15
|
+
MSSQL_PORT="${MSSQL_PORT:-1433}"
|
|
16
|
+
|
|
17
|
+
for i in {1..60}; do
|
|
18
|
+
# Primary: sqlcmd via docker exec when Docker socket is available
|
|
19
|
+
if command -v docker &>/dev/null; then
|
|
20
|
+
CONTAINER=$(docker ps -qf "ancestor=mcr.microsoft.com/mssql/server" 2>/dev/null | head -1)
|
|
21
|
+
if [ -n "$CONTAINER" ] && \
|
|
22
|
+
docker exec "$CONTAINER" /opt/mssql-tools18/bin/sqlcmd \
|
|
23
|
+
-S localhost -U sa -P "$MSSQL_SA_PASSWORD" -Q "SELECT 1" -No &>/dev/null 2>&1; then
|
|
24
|
+
echo " â
SQL Server service is ready"
|
|
25
|
+
SQLSERVER_READY=true
|
|
26
|
+
break
|
|
27
|
+
fi
|
|
28
|
+
fi
|
|
29
|
+
# Fallback: TCP connectivity check (no Docker socket available)
|
|
30
|
+
if bash -c "echo > /dev/tcp/${MSSQL_HOST}/${MSSQL_PORT}" 2>/dev/null; then
|
|
31
|
+
# Port is open â allow a brief settle time for full SQL Server initialisation
|
|
32
|
+
sleep 15
|
|
33
|
+
echo " â
SQL Server port ${MSSQL_PORT} is accepting connections"
|
|
17
34
|
SQLSERVER_READY=true
|
|
18
35
|
break
|
|
19
36
|
fi
|
|
@@ -21,7 +38,7 @@ for i in {1..30}; do
|
|
|
21
38
|
done
|
|
22
39
|
|
|
23
40
|
if [ "$SQLSERVER_READY" = false ]; then
|
|
24
|
-
echo " â SQL Server service not ready after
|
|
41
|
+
echo " â SQL Server service not ready after 120 seconds"
|
|
25
42
|
echo " â ī¸ SQL Server can take 30-60 seconds to start"
|
|
26
43
|
exit 1
|
|
27
44
|
fi
|
package/overlays/tempo/verify.sh
CHANGED
|
@@ -6,19 +6,25 @@ echo "đ Verifying Tempo installation..."
|
|
|
6
6
|
# Track overall success
|
|
7
7
|
ALL_CHECKS_PASSED=true
|
|
8
8
|
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
# Wait for Tempo /ready endpoint (primary health signal).
|
|
10
|
+
# docker ps is informational only â not reliably accessible in all devcontainers.
|
|
11
|
+
TEMPO_READY=false
|
|
12
|
+
for i in {1..40}; do
|
|
13
|
+
if curl -s -o /dev/null -w "%{http_code}" http://tempo:3200/ready 2>/dev/null | grep -q "200"; then
|
|
14
|
+
echo "â Tempo HTTP API is accessible"
|
|
15
|
+
TEMPO_READY=true
|
|
16
|
+
break
|
|
17
|
+
fi
|
|
18
|
+
sleep 3
|
|
19
|
+
done
|
|
20
|
+
if [ "$TEMPO_READY" = false ]; then
|
|
21
|
+
echo "â Tempo /ready endpoint not responding after 120 s (http://tempo:3200/ready)"
|
|
14
22
|
ALL_CHECKS_PASSED=false
|
|
15
23
|
fi
|
|
16
24
|
|
|
17
|
-
#
|
|
18
|
-
if
|
|
19
|
-
echo "â Tempo
|
|
20
|
-
else
|
|
21
|
-
echo "â ī¸ Tempo HTTP API not responding yet (may still be starting)"
|
|
25
|
+
# Informational: check via docker ps if available.
|
|
26
|
+
if docker ps --format '{{.Names}}' 2>/dev/null | grep -q tempo; then
|
|
27
|
+
echo "â Tempo container visible in docker ps"
|
|
22
28
|
fi
|
|
23
29
|
|
|
24
30
|
# Final result
|
package/overlays/tilt/setup.sh
CHANGED
|
@@ -5,13 +5,23 @@ set -e
|
|
|
5
5
|
|
|
6
6
|
echo "đ§ Setting up Tilt..."
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
|
|
8
|
+
# Source shared setup utilities
|
|
9
|
+
# shellcheck source=setup-utils.sh
|
|
10
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
TILT_VERSION="${TILT_VERSION:-0.37.0}"
|
|
13
|
+
detect_arch
|
|
14
|
+
TILT_ARCH="$CS_ARCH"
|
|
15
|
+
# tilt uses x86_64 for amd64 in its tarball names
|
|
16
|
+
[ "$TILT_ARCH" = "amd64" ] && TILT_ARCH="x86_64"
|
|
17
|
+
|
|
18
|
+
echo "đĻ Installing Tilt v${TILT_VERSION} for linux.${TILT_ARCH}..."
|
|
19
|
+
install_binary_from_tar \
|
|
20
|
+
"https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux.${TILT_ARCH}.tar.gz" \
|
|
21
|
+
"tilt"
|
|
12
22
|
|
|
13
23
|
# Verify installation
|
|
14
|
-
if command -v tilt
|
|
24
|
+
if command -v tilt &>/dev/null; then
|
|
15
25
|
echo "â
Tilt installed successfully"
|
|
16
26
|
tilt version
|
|
17
27
|
else
|
|
@@ -5,15 +5,38 @@ set -e
|
|
|
5
5
|
|
|
6
6
|
echo "đĻ Installing Codeium Windsurf CLI..."
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
|
|
8
|
+
# Windsurf CLI is distributed as a binary release from GitHub, not via npm
|
|
9
|
+
ARCH=$(uname -m)
|
|
10
|
+
case "$ARCH" in
|
|
11
|
+
x86_64) ARCH_TAG="x86_64" ;;
|
|
12
|
+
aarch64|arm64) ARCH_TAG="aarch64" ;;
|
|
13
|
+
*) echo "â ī¸ Unsupported architecture: $ARCH, skipping windsurf-cli installation"; exit 0 ;;
|
|
14
|
+
esac
|
|
15
|
+
|
|
16
|
+
WINDSURF_VERSION=$(curl -fsSL https://api.github.com/repos/codeium-ai/windsurf-cli/releases/latest 2>/dev/null | grep '"tag_name"' | head -1 | sed 's/.*"tag_name": *"\([^"]*\)".*/\1/')
|
|
17
|
+
|
|
18
|
+
if [ -z "$WINDSURF_VERSION" ]; then
|
|
19
|
+
echo "â ī¸ Could not determine latest windsurf-cli version, trying known stable"
|
|
20
|
+
WINDSURF_VERSION="v0.1.0"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
echo " Downloading windsurf-cli ${WINDSURF_VERSION} for ${ARCH_TAG}..."
|
|
24
|
+
DOWNLOAD_URL="https://github.com/codeium-ai/windsurf-cli/releases/download/${WINDSURF_VERSION}/windsurf-linux-${ARCH_TAG}"
|
|
25
|
+
|
|
26
|
+
if curl -fsSL --head "$DOWNLOAD_URL" >/dev/null 2>&1; then
|
|
27
|
+
curl -fsSL "$DOWNLOAD_URL" -o /tmp/windsurf
|
|
28
|
+
sudo install -m 0755 /tmp/windsurf /usr/local/bin/windsurf
|
|
29
|
+
rm -f /tmp/windsurf
|
|
30
|
+
else
|
|
31
|
+
echo "â ī¸ windsurf-cli binary not available for this platform â skipping"
|
|
32
|
+
exit 0
|
|
33
|
+
fi
|
|
10
34
|
|
|
11
35
|
# Verify installation
|
|
12
36
|
if command -v windsurf &>/dev/null; then
|
|
13
37
|
echo "â Windsurf CLI installed successfully: $(windsurf --version 2>/dev/null || echo 'installed')"
|
|
14
38
|
else
|
|
15
|
-
echo "
|
|
16
|
-
exit 1
|
|
39
|
+
echo "â ī¸ windsurf-cli not found after install â may need a shell restart"
|
|
17
40
|
fi
|
|
18
41
|
|
|
19
42
|
echo "â windsurf-cli setup complete"
|
|
@@ -5,10 +5,20 @@ set -e
|
|
|
5
5
|
|
|
6
6
|
echo "đ Verifying windsurf-cli overlay setup..."
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# windsurf-cli is a best-effort install â it is skipped on unsupported platforms
|
|
9
|
+
# (arm64 Linux). Exit 0 gracefully when it was intentionally not installed.
|
|
9
10
|
if ! command -v windsurf &>/dev/null; then
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
ARCH=$(uname -m)
|
|
12
|
+
case "$ARCH" in
|
|
13
|
+
aarch64|arm64)
|
|
14
|
+
echo "âšī¸ windsurf-cli skipped (not available for $ARCH)"
|
|
15
|
+
exit 0
|
|
16
|
+
;;
|
|
17
|
+
*)
|
|
18
|
+
echo "â windsurf CLI is not installed or not in PATH"
|
|
19
|
+
exit 1
|
|
20
|
+
;;
|
|
21
|
+
esac
|
|
12
22
|
fi
|
|
13
23
|
|
|
14
24
|
echo "â windsurf CLI is installed: $(windsurf --version 2>/dev/null || echo 'installed')"
|