Workspaces (Coder)
https://coder.k8s.semanticscience.org — sign in with Keycloak.
A workspace is a VM with a durable home directory. It runs under Kata, so it is isolated like a machine, not like a container: you get real sudo, your own kernel, and — if you ask for one — a whole GPU.
Creating one
There is one template, workspace. It takes these parameters:
| parameter | range | notes |
|---|---|---|
cpu | 1–16 | keep it ≤ 6 with a GPU — see the CPU rule below |
memory_gb | 2–64 | Kata sizes the VM from this, up front |
gpu_count | 0–3 | cards are exclusive. Use 1. |
gpu_model | NVIDIA-A40 / NVIDIA-L40S | which card, and therefore which node: A40s are on fsesrv-g1 (3 cards), L40S on fsesrv-g2 (2 cards). Same 46 GiB either way; the L40S is roughly twice as fast |
node | auto | leave it. Pinning exists for people who have been told to use one machine; a pinned workspace that does not fit waits forever instead of going elsewhere |
home_gb | 10–500 | size of the /mnt scratch disk, not your home. /home/coder is a pre-declared durable volume; ask to have it resized |
image | the container image; the default is fine |
Requests equal limits, so you get Guaranteed QoS: nobody's burst evicts you, and you cannot burst past what you asked for.
What survives and what does not
/home/coderis your durable volume. It survives stop, delete and rebuild. It is yours; the platform never touches it./mntis scratch. Wiped on every rebuild. Put nothing there you cannot regenerate.
GPU workspaces: the CPU rule
GPU workspaces run on two machines: fsesrv-g1 (three NVIDIA A40s, 32 CPU cores shared by everyone with a card there) and fsesrv-g2 (two NVIDIA L40S, 64 cores). Each GPU workspace costs 1 extra core and 10 GiB of Kata overhead on top of what you request.
GPU workspaces are capped at 6 CPU, and the template enforces it: asking for more with a GPU fails at build time with a message saying so. The number comes from g1 — 3 × (6+1) = 21 leaves room for three people on 32 cores; 3 × (8+1) does not — and it is one cap for both nodes so a workspace can move between them. CPU-only workspaces land on the big nodes and may use the full 16.
If a GPU workspace that fits the cap still will not start, it is waiting on a *card*: five in total, and a running workspace holds its card whether or not anything is on it.
Stop the workspace when you are not using the GPU.
The CLI
curl -fsSL https://coder.com/install.sh | sh
coder login https://coder.k8s.semanticscience.org
coder list
coder ssh <workspace> # a real shell; scp, rsync and -L port-forwards work
coder start <workspace>
coder stop <workspace>
coder create <name> --template workspace --yes \
--parameter cpu=6 --parameter memory_gb=32 --parameter gpu_count=1 \
--parameter gpu_model=NVIDIA-A40 --parameter home_gb=100 \
--parameter image=codercom/enterprise-base:ubuntu
coder update <workspace> # pick up a newer template version
coder tokens create # a token for scripts
When scripting coder create, pass every parameter listed above — the CLI prompts for any it is missing and fails without a terminal.
The API
Base https://coder.k8s.semanticscience.org/api/v2, header Coder-Session-Token: <token>.
export CODER_TOKEN="$(coder tokens create)"
CODER=https://coder.k8s.semanticscience.org/api/v2
curl -s -H "Coder-Session-Token: $CODER_TOKEN" $CODER/users/me
curl -s -H "Coder-Session-Token: $CODER_TOKEN" $CODER/workspaces
curl -s -X POST -H "Coder-Session-Token: $CODER_TOKEN" -H "Content-Type: application/json" \
$CODER/workspaces/<id>/builds -d '{"transition":"start"}' # or "stop"
Creating over the raw API needs the template version id and a parameter payload; use coder create for that.
Network from inside a workspace
- Outbound internet goes through a proxy.
HTTPS_PROXYis preset;pip,curl,gitandsudo aptjust work. - You cannot reach other cluster services by internal DNS name. Always the public hostname —
https://litellm.k8s.semanticscience.org, never*.svc.cluster.local. This is policy, not a bug.