SaylorTwift HF Staff commited on
Commit
ea9b383
·
verified ·
1 Parent(s): a7525f2

Use python3 (vllm image has no python alias)

Browse files
Files changed (1) hide show
  1. run_job.sh +7 -7
run_job.sh CHANGED
@@ -18,8 +18,8 @@ cd "$(dirname "$0")"
18
  echo "=== [setup] packages ==="
19
  # vllm + torch come from the base image (vllm/vllm-openai). Per TRL docs,
20
  # transformers>=5.2.0 may need --no-deps next to vllm's pinned stack.
21
- python -m pip install --quiet 'transformers>=5.2.0' --no-deps
22
- python -m pip install --quiet \
23
  'trl[peft]>=1.16.0' \
24
  'openenv[harbor]' \
25
  'harbor[hf-sandbox]>=0.24.0' \
@@ -28,14 +28,14 @@ python -m pip install --quiet \
28
 
29
  echo "=== [setup] OpenEnv repo (harbor_env lives in envs/, not the wheel) ==="
30
  git clone --depth 1 https://github.com/huggingface/OpenEnv.git /opt/OpenEnv
31
- SITE=$(python -c "import site; print(site.getsitepackages()[0])")
32
  echo "/opt/OpenEnv/envs" > "$SITE/openenv_examples.pth"
33
 
34
  echo "=== [setup] pinned tasks (1,000 train / 250 test, hash-checked) ==="
35
- python prepare_tasks.py --output /app/prepared
36
 
37
  echo "=== [check] imports ==="
38
- python - <<'EOF'
39
  import trl, openenv, harbor_env # noqa: F401
40
  from trl.experimental.async_grpo.openenv_harness import HarnessRolloutWorker # noqa: F401
41
  print("trl", trl.__version__, "| openenv", openenv.__version__)
@@ -56,7 +56,7 @@ PREPARED=/app/prepared bash serve_env.sh &
56
  ENV_PID=$!
57
 
58
  echo "=== [wait] servers ==="
59
- python - <<'EOF'
60
  import time, urllib.request
61
  for name, url in [("vllm", "http://127.0.0.1:8001/v1/models"),
62
  ("env", "http://127.0.0.1:8000/health")]:
@@ -76,7 +76,7 @@ CUDA_VISIBLE_DEVICES=0 \
76
  VLLM_URL=http://127.0.0.1:8001 \
77
  ENV_URL=http://127.0.0.1:8000 \
78
  TRAIN_SPLIT=/app/prepared/datasets/train \
79
- python train_lora.py
80
 
81
  kill $VLLM_PID $ENV_PID 2>/dev/null || true
82
  echo "=== done ==="
 
18
  echo "=== [setup] packages ==="
19
  # vllm + torch come from the base image (vllm/vllm-openai). Per TRL docs,
20
  # transformers>=5.2.0 may need --no-deps next to vllm's pinned stack.
21
+ python3 -m pip install --quiet 'transformers>=5.2.0' --no-deps
22
+ python3 -m pip install --quiet \
23
  'trl[peft]>=1.16.0' \
24
  'openenv[harbor]' \
25
  'harbor[hf-sandbox]>=0.24.0' \
 
28
 
29
  echo "=== [setup] OpenEnv repo (harbor_env lives in envs/, not the wheel) ==="
30
  git clone --depth 1 https://github.com/huggingface/OpenEnv.git /opt/OpenEnv
31
+ SITE=$(python3 -c "import site; print(site.getsitepackages()[0])")
32
  echo "/opt/OpenEnv/envs" > "$SITE/openenv_examples.pth"
33
 
34
  echo "=== [setup] pinned tasks (1,000 train / 250 test, hash-checked) ==="
35
+ python3 prepare_tasks.py --output /app/prepared
36
 
37
  echo "=== [check] imports ==="
38
+ python3 - <<'EOF'
39
  import trl, openenv, harbor_env # noqa: F401
40
  from trl.experimental.async_grpo.openenv_harness import HarnessRolloutWorker # noqa: F401
41
  print("trl", trl.__version__, "| openenv", openenv.__version__)
 
56
  ENV_PID=$!
57
 
58
  echo "=== [wait] servers ==="
59
+ python3 - <<'EOF'
60
  import time, urllib.request
61
  for name, url in [("vllm", "http://127.0.0.1:8001/v1/models"),
62
  ("env", "http://127.0.0.1:8000/health")]:
 
76
  VLLM_URL=http://127.0.0.1:8001 \
77
  ENV_URL=http://127.0.0.1:8000 \
78
  TRAIN_SPLIT=/app/prepared/datasets/train \
79
+ python3 train_lora.py
80
 
81
  kill $VLLM_PID $ENV_PID 2>/dev/null || true
82
  echo "=== done ==="