| name | repro-env |
| description | Reproduce a working project environment from one lab server on another — code at the same commit, a CUDA-compatible python env, and a smoke test. Use for "make this run on host B too" or setting up a new server. |
Reproduce an environment
Input: a project (directory on the source host) and a target host.
-
Fingerprint the source via run_command on host A:
- code:
git -C <dir> remote -v; git -C <dir> rev-parse HEAD; git -C <dir> status --porcelain | head
- env:
which python; python -V; pip freeze | head -60
(or conda env export --no-builds | head -60 for conda projects)
- torch:
python -c 'import torch; print(torch.__version__, torch.version.cuda)'
-
Check the target's ceiling. Driver and CUDA on B come from
list_hosts. If B's driver can't run A's CUDA build, pick the closest
torch build that works on B — and say so explicitly.
-
Code onto B: clone from the git remote and check out the same commit.
No usable remote? → copy_path the directory (excluding wandb/, runs/,
old checkpoints) after the user approves the size.
-
Env on B — the slow part goes in a detached tmux via start_session
(background) so nothing times out: create the venv/conda env with matching
python; install torch matching B's CUDA; pip install -r requirements.txt
if present, else the frozen list from step 1.
-
Smoke test:
python -c 'import torch; print(torch.cuda.is_available())'
then import the project's main package or run its smallest entrypoint with
--help.
Report
What matches (commit, python, torch), what differs and why (driver limits,
unavailable pins), and the exact activation command to use on B. Never modify
anything on the SOURCE host.