Skip to content

Commit 5683ab5

Browse files
alec-flowersclaude
andcommitted
feat: isolate compute-node venv from login-node .venv/
Compute-node SLURM jobs now use `.venv-compute/` via UV_PROJECT_ENVIRONMENT so `uv run` doesn't pick up the login node's `.venv/` (which may have wrong-arch native modules on cross-arch clusters like Lyris/Ptyche). Users install srtctl on the login node however they prefer (pip, uv sync, uv pip install -e .). The compute node manages its own venv independently. Tested on Lyris — mocker smoke test passes with .venv-compute/ created on aarch64 compute while .venv/ exists for x86_64 login. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f6bff83 commit 5683ab5

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ venv/
2020
env/
2121
ENV/
2222
.venv/
23+
.venv-compute/
2324

2425
# uv
2526
.uv/

src/srtctl/templates/job_script_minimal.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ echo "Preparing srtctl environment..."
8282
# This avoids arch mismatch when login node (x86_64) != compute node (aarch64)
8383
export PATH="${SRTCTL_SOURCE}/bin:$HOME/.local/bin:$PATH"
8484

85+
# Use a compute-specific venv so we don't pick up the login node's .venv/
86+
# (which may be built for a different arch, e.g. x86_64 login vs aarch64 compute)
87+
export UV_PROJECT_ENVIRONMENT="${SRTCTL_SOURCE}/.venv-compute"
88+
8589
if ! command -v uv &> /dev/null; then
8690
echo "ERROR: uv not found. Run 'make setup ARCH=<compute_arch>' first."
8791
echo " e.g., make setup ARCH=aarch64 (for GB200/Grace compute nodes)"

0 commit comments

Comments
 (0)