cuda-dev (shared GPU dev box)
The hosts of the cuda-dev range, dev1, dev2 and dev3, are the shared
dev boxes you use when work doesn’t fit on your laptop:
long-running Claude jobs, autonomous agents in bypass-permissions mode,
CUDA workloads, big container builds. You don’t get a shell on the host
itself — every developer gets their own
Incus container,
configured to look like a small Ubuntu box with Docker, mosh and the
standard toolchain pre-installed. GPU work runs on dev2 and dev3,
where the containers share the host’s GPU (cooperative; one heavy job at
a time). Each container is treated as throwaway: if
it gets into a bad state we rebuild it from the golden image and you
keep going.
Prerequisites
Section titled “Prerequisites”- A working Company VPN connection. The dev box lives on the office LAN
(
192.168.2.26), so the WireGuard tunnel needs to be up — see Services → Company VPN.ping 192.168.2.26should answer once it is. - A request in to infra. Mention you want a
cuda-dev container; the onboarding tool
takes it from there. In one go it generates a dedicated SSH key pair
for you, creates and starts your container on each host, drops the
pubkey into it, picks up the container’s LAN IP, and emails you
everything you need — a one-time Bitwarden Send link for the private
key, a permanent Bitwarden item reference, and a ready-to-paste
~/.ssh/configsnippet with the actual IP baked in. Nothing for you to edit by hand and no second hand-off.
Connecting
Section titled “Connecting”Containers attach to the office LAN via macvlan on the host’s NIC, so
each one gets its own 192.168.2.x DHCP lease from the office router.
You SSH straight to the container — no jump host, no ProxyJump, no
host shell involved.
Step 1: get your private SSH key onto your laptop
Section titled “Step 1: get your private SSH key onto your laptop”The provisioning email gives you two ways to do this. Pick one.
Option A — Bitwarden Desktop SSH agent (recommended if you already
use it for the rest of your infra keys). Open Bitwarden, find the
item cuda-dev key / <localpart> in the d-centralize - Infra
collection, and make sure the SSH agent toggle is on for that item.
Then drop the public half of the key into ~/.ssh/cuda-dev-<localpart>.pub
on your laptop — that file is just a selector telling SSH which
agent-loaded key to use, not a private key:
# Paste the `ssh-ed25519 AAAA…` line from the Bitwarden item.$EDITOR ~/.ssh/cuda-dev-<localpart>.pubchmod 644 ~/.ssh/cuda-dev-<localpart>.pubThe matching private half stays inside Bitwarden Desktop forever; the
agent serves it on demand. This is the same pattern as every other
<host> SSH key Bitwarden item — see
Setup → Git and the Host * / IdentityAgent block
near the top of your ~/.ssh/config.
Option B — copy the private key to disk. Click the one-time Bitwarden Send link in your email (good for 7 days, three retrievals), copy the contents, and save them as the file:
$EDITOR ~/.ssh/cuda-dev-<localpart> # paste the private keychmod 600 ~/.ssh/cuda-dev-<localpart>The same key also lives permanently in Bitwarden as cuda-dev key / <localpart> if you miss the Send window — you can re-export the
private half from there.
Step 2: drop the SSH config block
Section titled “Step 2: drop the SSH config block”The provisioning email arrives with one block per host and the actual
IPs filled in; the example below uses placeholders. The IdentityFile line points at
the path you just created in step 1 — for option A it’s the .pub
selector, for option B it’s the private key itself. SSH treats both
the same way at the call site.
Host dev<N>-<localpart> HostName 192.168.2.<your-container-ip> User dev IdentityFile ~/.ssh/cuda-dev-<localpart> # option B (private key) # IdentityFile ~/.ssh/cuda-dev-<localpart>.pub # option A (BW agent selector) IdentitiesOnly yesThen:
ssh dev<N>-<localpart>You land as dev inside your own container, with sudo. The first connection
prompts you to accept the host key — that’s expected.
mosh for flaky links
Section titled “mosh for flaky links”The dev profile installs mosh so you can survive hotel Wi-Fi without losing your shell. Same target, no SSH config tricks:
mosh dev<N>-<localpart>What’s inside
Section titled “What’s inside”The container is built from the cuda-dev-golden image. The exact list
of installed packages is defined in
golden-image.yml
in the infra repo — open an MR there if you want something else baked
in. At the time of writing it includes:
- Ubuntu 26.04 (matches the host).
- Docker +
docker compose(nested — the dev profile setssecurity.nesting=true). - mosh, tmux, git, vim, htop, build-essential, Python 3 + pipx +
python3-venv. - Claude Code CLI (
claude). - On
dev2anddev3, the NVIDIA driver from the host, bind-mounted vianvidia.runtime=true;nvidia-smiworks and so do CUDA container images.
docker --versionnvidia-smiclaude --versionYour agent instructions
Section titled “Your agent instructions”Claude Code reads ~/.claude/CLAUDE.md and Codex reads ~/.codex/AGENTS.md.
On a cuda-dev box both hold the same generated text, rebuilt on every shell
start and every rebuild:
- a header line saying the file is generated;
- the company
AGENTS.mdfrom dc/dcentralize/ai; - after a blank line, your own
~/AGENTS.local.md, if it exists.
Put your own instructions in ~/AGENTS.local.md: it lives in your home and
survives rebuilds. Do not edit or symlink the generated files; the setup moves
a hand-written one aside to <name>.bak. The parts carry no labels of their
own, so start your file with a heading if you want your part to stand out.
Workboard task boxes get the same text.
Working with the GPU
Section titled “Working with the GPU”GPU work runs on dev2 (GTX 1660 SUPER, 6 GB VRAM) and dev3 (RTX 3060,
12 GB VRAM); dev1 has no GPU. Each of these hosts has one consumer GPU that
its containers share. Allocation is cooperative: everyone can see the device, but in
practice one heavy job at a time is what fits. If you’re about to kick
off a multi-hour CUDA run, drop a note in
#infra
so others know to hold off.
Live host status, GPU utilisation and per-container metrics are at
https://grafana.d-centralize.nl/d/cuda-dev
(also picked up by uptime-kuma at
https://status.d-centralize.nl/status/d-centralize). nvidia-smi -l 5
from inside your container is still the quickest way to check who’s on
the GPU right now.
Resource limits
Section titled “Resource limits”The default per-container limits are generous so a sole-occupant developer gets most of the host:
| Limit | Value |
|---|---|
| CPU | 8 cores |
| Memory | 24 GB |
| Root disk | 200 GB (100 GB on dev3) |
Home (/home/dev) | 200 GB (100 GB on dev3) |
Bulk (~/data, when mounted) | 180 GB |
The disk limits are quotas on one pool that all containers on a host share, so the pool can run full before you reach yours. Usage per developer is on the cuda-dev dashboard.
If you genuinely need more — large dataset, build pipeline, etc. — ping ops; the limits are profile-level and trivial to bump per container.
The host also has 64 GB swap, so a temporary spike beyond your memory limit will spill there rather than OOM-kill (but you’ll feel it).
Treating the container as throwaway
Section titled “Treating the container as throwaway”Your home directory, /home/dev, is its own disk: it survives rebuilds and
image upgrades. A rebuild recreates everything outside it from the
cuda-dev-golden image:
- packages you installed with
apt, and your changes in/etc,/optand/usr/local; - Docker images, containers and volumes. Keep data you need, such as a local database, in a bind mount under your home or in a dump;
- your
worktask boxes. Their conversations come back: launch the task again from Workboard and its agent continues where it stopped, but whatever it had not pushed is gone.
Put the tools you install yourself in the install.sh of your private
dotfiles repo, gitlab.d-centralize.nl/<gitlab-username>/cuda-dev-dotfiles,
so they come back after every rebuild. Run background jobs as a systemd user
unit in ~/.config/systemd/user: it lives in your home and starts at boot
without a login. A crontab lives outside your home and is gone after a rebuild.
Inside your home, the setup replaces only the company-managed paths;
everything else is yours. The list is under “What the baseline owns” in the
onboarding README.
A rebuilt box keeps its IP address and SSH host key, so your SSH config keeps working without a host-key warning. A rebuild ends your running sessions.
Every box resets its Docker on the first Tuesday of the month: all
containers, images and volumes go, and data bind-mounted from your home stays.
The login banner announces it from three days ahead. To keep your containers
and volumes longer, write a date at most 30 days ahead to
~/.docker-reset-defer:
date -d +30days +%F > ~/.docker-reset-deferIf your box has a bulk volume mounted at ~/data, use it for cold data you can
download or build again: source downloads, dumps and build artifacts. It survives
rebuilds, but it is a single old disk, so never keep the only copy of anything there.
- Rebuild when the system rots. Ask ops to rebuild your box.
- Start over with an empty home, also after a compromise, since a plain rebuild keeps whatever was planted in your home. Ask ops for a rebuild with a fresh home. Everything in your home is gone, including your Claude and Codex sessions.
- Snapshot before risky experiments. A one-line message to
ops gets you a named snapshot of your home volume
(
incus storage volume snapshot create default home-<localpart> pre-experiment).
Where your work lives
Section titled “Where your work lives”Every piece of work gets a lease that lives 30 days unless you extend it.
lease new requires a GitLab issue or merge request URL and derives the name
as <project>-<number>; custom names are not supported:
lease new https://gitlab.d-centralize.nl/dc/pro6pp/pro6pp/-/issues/1127 # ~/work/pro6pp-1127/lease new https://gitlab.d-centralize.nl/dc/dcentralize/scripts/-/merge_requests/423 # ~/work/scripts-423/lease ls # your leases with expiry, size and URLlease extend pro6pp-1127 # 30 days from todaylease rm pro6pp-1127 # finished: stops its Compose project, deletes itPut the work’s worktrees, scratch output and database data in
~/work/<lease>/. If your box has a bulk volume mounted at ~/data, keep big
files you can fetch or build again in ~/data/<lease>/. Start its Compose project as
docker compose -p <lease> and bind-mount database data into the lease
directory: it then survives the monthly Docker reset and goes with the lease. An
expired lease is deleted every night, with its Compose project and volumes.
The login banner lists leases that expire within three days.
The rest of your home is cleaned up by age:
- Each entry in
~/scratch: deleted whole when nothing in it changed for 14 days, after three days on the login banner. - Top-level entries other than dotfiles,
~/git,~/work,~/data,~/scratch,~/binand~/AGENTS.local.md: deleted when nothing in them changed for 30 days, after three days on the login banner. - Docker images older than 14 days and build cache older than 7 days, unless a container uses them.
Renewing the shared AI logins
Section titled “Renewing the shared AI logins”Each cuda-dev host has its own logins: two Claude logins (the company accounts
ai@d-centralize.nl and ai2@d-centralize.nl) and a Codex login, shared by
every dev box on that host. They expire and are renewed separately per host:
renewing ai2 on dev2 leaves ai2 on dev1 and dev3 as it was. The
LiteLLM claude and gpt models run on the logins of two backend containers,
inc-claude and inc-codex. A Claude login lasts about four weeks from its
sign-in, so it needs a renewal before then. A login needs renewing when:
- Claude asks you to
/login, orclaude-account statusshowslogged out; - Codex reports an expired or invalid token;
- an
AiLoginExpiringorAiLoginDeadalert names it.
Members of the Keycloak groups trusted-ops, appsemble-prod, pro6pp-prod
and itslanguage-prod can renew them. The sign-in codes and links arrive in the
ai@d-centralize.nl mailbox: its Bitwarden item mail.d-centralize.nl (user
ai@d-centralize.nl) is in the collections those groups open: d-centralize - Prod,
Appsemble - Prod, Pro6PP - Prod and ITSLanguage - Prod.
In your box on the host whose login needs renewing (an alert names the host), run:
ai-team-reseedIt checks every login, lists the healthy ones with their expiry dates, and
walks you through renewing the rest, one sign-in per login, with the steps
printed in your terminal. For the LiteLLM backends it first asks you to approve
a Keycloak login as yourself. To renew a login that is still valid, name it, for
example ai-team-reseed claude-ai2 (the names are claude-ai, claude-ai2,
codex, litellm-claude and litellm-gpt).
Your box can renew only its own host’s logins: for another host, run it in your box on that host. The LiteLLM backends are the exception, renewed from a box on any host.
How the logins work:
claude-auth.md
and
codex-auth.md
in the scripts repo, and the backends in the
infra docs.
When things go wrong
Section titled “When things go wrong”Permission denied (publickey)onssh dev<N>-<localpart>: your pubkey isn’t in the container’s~/.ssh/authorized_keysyet. Confirm with ops that the right key landed.- Claude asks you to
/login, or Codex reports an expired token: the host’s shared login needs renewing; see Renewing the shared AI logins. ping 192.168.2.26doesn’t answer — the VPN’s down; see Services → Company VPN.- GPU not visible inside the container on
dev2ordev3:nvidia-smifailing is almost always either a driver mismatch (host rebooted, container needs a restart) or the GPU device fell off the profile. Ping ops.
