# Where the graphics card is, for scripts.splat_build / scripts.direct_build and for the pipeline's `reconstruction` # feature. Copy to runs/gpu.env (runs/ is not in git), fill in, then `source runs/gpu.env` before the scripts, or start # the pipeline's server with GBB_SPLAT_ENV=runs/gpu.env (the `backend-reconstruction` entry of .claude/launch.json). # # The cameras are found on this machine; everything after them that needs a card (depths, training, following what # moves, packing) runs on the other machine as ONE job over ONE connection: scripts/splat/remote.sh. V="/path/on/that/machine/v2g" # a work folder there: environments, weights, jobs export GBB_SPLAT_REMOTE="scripts/splat/remote.sh" # The ssh command that reaches the machine. BatchMode: it must not ask for anything. export GBB_GPU_SSH="ssh -i $HOME/.ssh/KEY -o IdentitiesOnly=yes -o BatchMode=yes -o ConnectTimeout=20 -o ServerAliveInterval=30 -l USER HOST" export GBB_GPU_DIR="$V" # A python there with numpy, scipy, cv2, PIL, torch, transformers and gsplat. export GBB_GPU_PYTHON="$V/venv/bin/python" # Shell run there first (optional): load modules, put ffmpeg and ffprobe on PATH. export GBB_GPU_SETUP="source /etc/profile; module load cuda ffmpeg" # Through Slurm: sbatch options (account, partition, ONE card, a time limit). Leave unset to run on the host itself. export GBB_GPU_SBATCH="--account=ACCOUNT -p gpu --gres=gpu:1 --cpus-per-task=16 --mem=64G --time=01:30:00" # The trainer and what follows the things that move, as commands for that machine ({...} are filled in by the scripts). export GBB_SPLAT_TRAINER="$V/venv/bin/python scripts/splat/train_cuda.py {data} {out} --steps {steps} --renders --depth 0.05" # SAM 2.1 (its own environment, and its weights: sam2.1_hiera_large.pt). Without this line nothing that moves is found. export GBB_SPLAT_SEGMENT="env -u PYTHONPATH $V/sam-venv/bin/python scripts/splat/segment_cuda.py {frames} {seeds} {out} --weights $V/weights/sam2.1_hiera_large.pt" unset V # A card on THIS machine instead: leave GBB_SPLAT_REMOTE and the GBB_GPU_* lines out and set only GBB_SPLAT_TRAINER and # GBB_SPLAT_SEGMENT (as commands for this machine). With neither, Brush trains here (GBB_BRUSH, or # runs/splat-tools/*/brush_app) and nothing that moves is found.