Important

Current version of the skill: 1.2 — 19 November 2026. If your copy is older, update it.

AI coding agents (Claude Code, Codex, Gemini CLI, Cursor, Copilot…) can run commands on the GPU servers for you: launch jobs, start model servers, download models. They do not know that the machines are shared. Left to themselves, they may leave processes running, open a model server to the whole network, or fill a disk. You remain responsible for what your agent launches.

The skill below gives your agent the essential rules of Sharing the GPU servers: check which GPU is free, ask you before heavy jobs, keep model servers local, and stop everything at the end of the session. It works with any agent.

Install the skill#

Download SKILL.md and save it in a folder named acss-cluster-good-practices, on the computer where your agent runs: usually your laptop, or the server if you work there directly (for example with VS Code Remote-SSH).

Or install it with one command — set DIR to your agent's skills folder from the table below:

bash
DIR=~/.claude/skills    # Claude Code; see the table for other agents
mkdir -p "$DIR/acss-cluster-good-practices" && wget -qO "$DIR/acss-cluster-good-practices/SKILL.md" \
  https://extranet.acss-psl.eu/api/bonnes-pratiques/fichiers/_skills/acss-cluster-good-practices/SKILL.md

No wget (macOS)? Replace wget -qO with curl -fsSLo. Run the same command again to update the skill.

Agent For all your projects For one project only
Claude Code ~/.claude/skills/acss-cluster-good-practices/SKILL.md .claude/skills/acss-cluster-good-practices/SKILL.md
GitHub Copilot (VS Code, CLI) ~/.copilot/skills/acss-cluster-good-practices/SKILL.md .github/skills/acss-cluster-good-practices/SKILL.md
Codex ~/.agents/skills/acss-cluster-good-practices/SKILL.md .agents/skills/acss-cluster-good-practices/SKILL.md
Gemini CLI ~/.gemini/skills/acss-cluster-good-practices/SKILL.md .gemini/skills/acss-cluster-good-practices/SKILL.md

Project paths are relative to the root of your project. ~/.agents/skills/ is also read by Copilot and Gemini CLI (not by Claude Code): if you use several of these three agents, one copy there is enough.

Other agents (Cursor…): if your agent supports the open Agent Skills format, see its documentation for its skills folder; otherwise paste the content of the skill into its instructions file (AGENTS.md, Cursor rules…) in the project you work on.

Version and updates#

The skill changes over time. Its version is written at the top of the file (version in the header): compare it with the latest version below, and run the install command again to update. You can also ask your agent which version of the skill it follows.

Version Date Changes
1.2 2026-11-19 For batch inference, the agent runs vLLM inside the script (Python API) rather than as a server, so the GPU is freed when the script exits. When a job needs its own server, the script stops it without a fixed 30-second wait and forces the stop only if a worker is still there.
1.1 2026-11-11 Jobs that keep running after the agent's session must free their GPU by themselves when they finish. The agent estimates the run time on small samples before a full run, announces the end time and makes the job report its progress. The agent checks the GPUs when you come back to a job. The skill now has a version number.
1.0 2026-11-07 to 2026-11-10 First versions, without a version number.

Even with the skill, keep the agent's permission prompts on, read the commands it proposes, and check nvidia-smi yourself at the end of the session.

The skill#

markdown
---
name: acss-cluster-good-practices
description: "Rules for any AI agent running commands on the ACSS GPU servers (the cluster nicknamed Marcelle: the 4×H100, 2×H100 and L40S machines, usually reached as `4h100`, `2h100`, `l40s`). Use it before launching any job, model server (vLLM, Ollama, TGI…), notebook, download or long-running process on these machines, at the end of every session, and when the user comes back to check on a job launched earlier. The servers are shared by many researchers, with no scheduler and no quotas, so a forgotten process or a full disk blocks everyone."
metadata:
  version: "1.2"
  updated: "2026-11-19"
---

# ACSS GPU cluster — good practices for AI agents

The ACSS GPU servers are shared by many researchers. There is no job scheduler and there are no quotas: every user, and every agent acting for a user, is responsible for not blocking the machines for others. You act on behalf of the user, so the user remains responsible for what you launch. When in doubt, stop and ask the user.

Full human documentation: the "Sharing the GPU servers", "AI Tools" and "Distributed & Multi-GPU" pages of the ACSS cluster documentation.

**Skill version 1.2 (2026-11-19).** If the user asks which version of the rules you follow, give this version. The current version is listed in the changelog of the "AI agents on the servers" page of the documentation.

## Never

- **Never use `sudo`** or try to change system configuration, system packages, drivers or services. Ask the user to contact the ACSS team instead.
- **Never stop, renice or signal another user's processes.** You may only touch processes owned by the current user. If another user's process looks abandoned, tell the user and suggest they report it on the cluster's Discord channel.
- **Never expose a service to the network.** Model servers, notebooks, dashboards and APIs listen on `127.0.0.1` only. Never use `--host 0.0.0.0` (or an empty host). The user reaches services through an SSH tunnel.
- **Write only in the user's home directory.** Never put models, datasets, caches or large outputs in `/tmp`, `/var/tmp` or `/scratch`: they are on the small system disk, and if it fills up the whole server stops for everyone. Shared storage outside the home directory is reserved for system backups.
- **Never leave a process running that you started and no longer need**, and never end a session without the end-of-session check below.
- **Never start a heavy job without the user's explicit go-ahead** (see "Heavy jobs").
- **Never launch a job that will outlive your session unless it frees its GPU by itself when it finishes** (see "Jobs that outlive your session").

## Before launching anything on a GPU

1. Check which GPUs are free. Use a one-shot command, not `watch`:

   ```bash
   nvidia-smi --query-gpu=index,memory.used,memory.total,utilization.gpu --format=csv
   ```

   A GPU is free only if its **memory used** is near zero (under ~100 MiB on an H100). **0 % utilisation does not mean free:** an idle model server keeps all its memory.
2. Pick one free GPU explicitly and pin the job to it: `CUDA_VISIBLE_DEVICES=<index> …`. Never rely on the default (GPU 0) and never use all GPUs implicitly.
3. **Use one GPU** unless the model or batch genuinely does not fit. On the 4×H100, a two-GPU job must use an NVLink pair: GPUs `0,1` or `2,3`. The 2×H100 has no NVLink.
4. Check free disk space before downloading anything: `df -h ~`. Estimate the download size first (a model needs ~2 GB per billion parameters in bf16).
5. Prefer the smallest model that does the task. Test on small samples and measure time and quality before running on a full corpus or switching to a bigger model (see "Estimate the run time").

A process that exits frees its GPU memory automatically. Memory stays held only by processes that are still alive: a script that finished computing but did not exit, a notebook kernel, a model server, or a vLLM worker that survived its server.

## Estimate the run time before a full run

Never launch a full run without knowing roughly how long it will take.

1. Run the job in growing steps: about 10 items to check that it works and that the output is correct, then about 100, then about 1,000 to measure a stable speed (items per minute). Stop at the step where the speed is stable.
2. Extrapolate to the full corpus and tell the user, before launching: the estimated duration and the estimated end time. If the estimate makes the job heavy (see "Heavy jobs"), follow the heavy-job rule.
3. Make the job report its progress: a progress bar (`tqdm`) or a log line at regular intervals with items done, total, and estimated time remaining. The user, or you in a later session, must be able to read the remaining time from the log.
4. Make long jobs resumable: write results as you go, so that a stopped job does not start again from zero.

## Heavy jobs: ask the user first

A job is heavy when it:

- uses **several GPUs**, or one GPU for **more than a day**;
- runs a **model server** meant to stay up;
- downloads or writes **more than ~100 GB** (models, datasets, checkpoints);
- uses **many CPU cores or much RAM** for hours.

Before starting a heavy job, stop and tell the user: which machine and GPUs, the estimated duration and end time, how much disk. Remind them to announce it on the cluster's Discord channel with the same information, and to post again when the job is done. Start only after they confirm.

## Running processes

- **Run anything long in a named `tmux` session**, never with a bare `&` or `nohup` in a shell that will disappear. Use a recognisable name, for example `tmux new -d -s agent-<task> '<command>'`.
- **Keep track of everything you start:** tmux session names, PIDs, ports, GPUs. You must be able to stop all of it at the end.
- **Python environments:** install packages in a virtual environment in the user's home (`uv venv`, `python -m venv`), never system-wide.
- **Jupyter kernels** keep their GPU memory until the kernel is shut down, even when idle. Do not run long jobs in a notebook: run them as scripts.

## Jobs that outlive your session

If a job is still running when you hand back to the user, nobody checks it when it finishes. It must therefore free its GPU by itself.

- **Give the job as the command of the tmux session**, with its output in a log file. The session then closes when the job exits, and the GPU is freed:

  ```bash
  mkdir -p ~/logs
  tmux new -d -s agent-<task> 'CUDA_VISIBLE_DEVICES=<free GPU> python <script>.py > ~/logs/<task>.log 2>&1'
  ```

- **Never start the job by typing it into an interactive shell inside tmux**, and never append `; bash` or anything that keeps the session open after the job.
- **The script must exit when the computation is done:** no `input()`, no blocking plot window, no final `sleep` or wait, no server left running.
- **For batch inference with vLLM, prefer no server at all:** load the model in the script with vLLM's Python API (`from vllm import LLM, SamplingParams`; `llm.chat(...)` or `llm.generate(...)` on the whole list of prompts). vLLM batches the prompts itself, and the GPU is freed when the script exits. Use a server (`vllm serve`, on `127.0.0.1`) only if the code must send its requests to a local server, for example through the OpenAI client or a library that calls one.
- **If the job needs its own model server**, start and stop the server in the same script, so that the server stops when the job ends, even on error:

  ```bash
  #!/usr/bin/env bash
  # ~/jobs/<task>.sh: start the server, run the job, stop the server in all cases
  export VLLM_API_KEY=$(cat ~/.vllm_key) CUDA_VISIBLE_DEVICES=<free GPU>
  # setsid puts the server and its workers in their own process group
  setsid vllm serve <model> --host 127.0.0.1 --port <free port> &
  SERVER=$!
  # on exit: stop the whole group, wait up to 30 s, force only if still there
  stop_server() {
    kill -- -"$SERVER" 2>/dev/null || return 0
    for _ in $(seq 30); do
      kill -0 -- -"$SERVER" 2>/dev/null || return 0
      sleep 1
    done
    kill -9 -- -"$SERVER" 2>/dev/null
  }
  trap stop_server EXIT
  until curl -sf http://127.0.0.1:<free port>/health > /dev/null; do
    kill -0 "$SERVER" 2>/dev/null || exit 1   # the server failed to start
    sleep 5
  done
  python <script>.py
  ```

  Launch it with `tmux new -d -s agent-<task> 'bash ~/jobs/<task>.sh > ~/logs/<task>.log 2>&1'`.
- **Before handing back, tell the user:** the machine, the GPU, the tmux session name, the log file, the estimated end time, and how to stop the job (`tmux kill-session -t agent-<task>`). Ask them to have the GPUs checked when they come back.

## When the user comes back

When the user asks about a job launched earlier, or starts a new session after one: read the end of the log for progress and remaining time, then run the end-of-session check below. If the job is finished and something of the user's still holds a GPU, stop it (after asking, if you did not start it yourself).

## Model servers (vLLM and similar)

```bash
# key file readable by the user only, from the start
[ -f ~/.vllm_key ] || (umask 077; openssl rand -hex 16 > ~/.vllm_key)
# single quotes: the key is read inside tmux and passed through the environment
tmux new -d -s agent-vllm 'VLLM_API_KEY=$(cat ~/.vllm_key) \
  CUDA_VISIBLE_DEVICES=<free GPU> vllm serve <model> \
  --host 127.0.0.1 --port 8000 --gpu-memory-utilization 0.5'
```

- Always `--host 127.0.0.1`. An API key is recommended: it prevents other users of the machine from using the server by mistake.
- **Never put the key on a command line** (`--api-key <key>`, `curl -H "Authorization: Bearer <key>"`, or a double-quoted tmux command that expands it): every user of the machine can read command lines with `ps`. Pass it through the `VLLM_API_KEY` environment variable, which vLLM reads, and read it from `~/.vllm_key` in client code. Never print the key in your output.
- The key is a safeguard against mistakes, not strong security. The real protection is listening on `127.0.0.1` only.
- vLLM reserves 90 % of each GPU's memory by default: lower `--gpu-memory-utilization` for small models.
- If the port is taken (`ss -ltn | grep 8000`), pick another one. Do not stop whatever is using it.
- **Stopping the main vLLM process does not always free the GPU:** its worker `VLLM::EngineCore` (in capitals) can survive as an orphan and hold the memory for days. `ps aux | grep vllm` does not find it, and a server can be started either as `vllm serve` or as `python -m vllm.entrypoints.openai.api_server`. Always check with the command below.

## Stopping processes

- Stop processes with `kill <PID>` (SIGTERM) and wait up to 30 seconds. Use `kill -9` only if the process is still there: a brutal stop can leave orphaned GPU workers.
- Stop only what you started, or what the user explicitly asks you to stop. If you find other leftover processes of the user, list them and ask before stopping them.

## End of session — mandatory check

Run this before ending the session or handing back to the user:

```bash
# Processes of the current user holding a GPU
for pid in $(nvidia-smi --query-compute-apps=pid --format=csv,noheader); do
  [ "$(stat -c %U /proc/$pid 2>/dev/null)" = "$USER" ] && ps -o pid=,etime=,args= -p "$pid"
done
# vLLM servers and orphaned engines
pgrep -u "$USER" -af 'VLLM::[E]ngineCore|vllm [s]erve|vllm[.]entrypoints'
# tmux sessions
tmux ls 2>/dev/null
```

Then:

1. Stop everything you started that is no longer needed (servers, workers, notebook kernels, tmux sessions).
2. Re-run the check: it must show nothing of yours, unless the user explicitly asked to keep a job running.
3. Tell the user what is still running, on which machine and GPU, until about when, and how to stop it. Anything left running must follow "Jobs that outlive your session".
4. Point out large files you downloaded or created that may no longer be needed (`du -sh ~/.cache/* | sort -rh`, `hf cache ls`), and suggest deleting them. Delete only with the user's agreement.

## Disk hygiene

- Hugging Face models and package caches grow silently in `~/.cache`: a single large model can exceed 100 GB.
- Do not download a model or dataset again if it is already in the cache.
- Keep data, models and checkpoints out of Git repositories.
- The servers are not backed up: remind the user to keep their own copy of important results.

What's next?#

I want to… Go to
Read the full rules for shared GPUs Sharing the GPU servers
Run a model server with vLLM AI Tools

Collection coordinated, checked on the machines and partly written by Bruno Chaves Ferreira (ACSS), building on the original guides by Mouhamed Sy, Olivier Caron and William Aboucaya, with contributions from Antoine Mazières.

Last updated: November 19, 2026 · All good practices