|
20 | 20 | # |
21 | 21 | # Behavior: |
22 | 22 | # 1. Materializes HOME + PYTHONUSERBASE dirs (tmpfs, world-writable) |
23 | | -# 2. Installs pytest deps (junitparser et al.) into the shared PYTHONUSERBASE |
24 | | -# 3. Derives shard count from nvidia-smi -L (authoritative; torch.cuda.device_count |
| 23 | +# 2. Derives shard count from nvidia-smi -L (authoritative; torch.cuda.device_count |
25 | 24 | # under-counts MIG-on-same-parent unless CUDA_VISIBLE_DEVICES enumerates each) |
26 | | -# 4. Cross-checks torch against the nvidia-smi count and caps shards to what torch |
| 25 | +# 3. Cross-checks torch against the nvidia-smi count and caps shards to what torch |
27 | 26 | # can address (guards against CUDA_VISIBLE_DEVICES misconfig on a MIG host) |
28 | | -# 5. Fans out 1 pytest subshell per non-default cuda:N with per-shard HOME + |
| 27 | +# 4. Fans out 1 pytest subshell per non-default cuda:N with per-shard HOME + |
29 | 28 | # ISAACLAB_TEST_DEVICES; each shard tees its stdout to |
30 | 29 | # /shard-logs/cuda-N.log for the host's grouped re-print after the run |
31 | | -# 6. Waits on every shard before aggregating exit codes — a fast failure doesn't |
| 30 | +# 5. Waits on every shard before aggregating exit codes — a fast failure doesn't |
32 | 31 | # tear down still-running siblings |
| 32 | +# |
| 33 | +# The pytest deps (pytest, junitparser et al.) are baked into the image by |
| 34 | +# .github/actions/docker-build, so this script no longer installs them. |
33 | 35 |
|
34 | 36 | set +e # keep going on errors; per-shard exit codes are aggregated at the end |
35 | 37 | cd /workspace/isaaclab |
36 | 38 | unset DISPLAY # clear the var that would force Kit into headed (X11) mode |
37 | 39 |
|
38 | | -# Container-level HOME + PYTHONUSERBASE for pip --user installs. The image |
39 | | -# runs as --user $host_uid:$host_gid with no matching /etc/passwd entry, so |
40 | | -# HOME defaults to /root which the user cannot write. /tmp/* is on tmpfs |
| 40 | +# Container-level HOME + PYTHONUSERBASE. The image runs as |
| 41 | +# --user $host_uid:$host_gid with no matching /etc/passwd entry, so HOME |
| 42 | +# defaults to /root which the user cannot write. /tmp/* is on tmpfs |
41 | 43 | # (1777, world-writable). |
42 | 44 | # |
43 | | -# PYTHONUSERBASE is the key for the 1-docker shape: pip --user writes to |
44 | | -# ${PYTHONUSERBASE}/lib/python3.12/site-packages, and every Python invocation |
45 | | -# that sees the same env var imports from there. Per-shard subshells below |
46 | | -# override HOME (so .cache / .nvidia-omniverse are isolated) but inherit |
47 | | -# PYTHONUSERBASE so junitparser et al. resolve everywhere. |
| 45 | +# Both must exist before any shard starts: per-shard subshells below override |
| 46 | +# HOME (so .cache / .nvidia-omniverse are isolated) but inherit |
| 47 | +# PYTHONUSERBASE, so anything writing to the user site shares one directory. |
48 | 48 | mkdir -p /tmp/mgpu-base-home /tmp/mgpu-pyuserbase |
49 | 49 |
|
50 | | -# Pytest deps (same as run-tests action). junitparser is imported at |
51 | | -# tools/conftest.py load time, so it must be present first. |
52 | | -bash .github/actions/_lib/with-python-package-retries.sh \ |
53 | | - ./isaaclab.sh -p -m pip install pytest pytest-mock junitparser flaky "coverage>=7.6.1" |
54 | | - |
55 | 50 | # Shard count from nvidia-smi -L (truth; torch under-counts MIG). |
56 | 51 | MIG_COUNT=$(nvidia-smi -L | grep -c "^ MIG ") # grep -c = count of matching lines (MIG slices) |
57 | 52 | GPU_COUNT=$(nvidia-smi -L | grep -c "^GPU ") # count of whole GPUs |
|
0 commit comments