2020 env :
2121 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2222 GITHUB_REPOSITORY : ${{ github.repository }}
23- # Persistent venv with torch + vLLM deps (survives across runs).
24- # Bootstrap once, then reuse. The user's vLLM fork is installed fresh each run.
25- MODEL_VENV : /opt/model-venv
2623 steps :
2724 - uses : actions/checkout@v3
2825
@@ -42,40 +39,28 @@ jobs:
4239 - name : Install uv
4340 uses : astral-sh/setup-uv@v4
4441
45- - name : Setup persistent model venv
42+ - name : Setup environment
4643 shell : bash
4744 run : |
48- # Create persistent venv if it doesn't exist, with torch + vLLM deps pre-installed.
49- # Mirrors the Modal model_image: install vllm to get all deps, then uninstall vllm.
50- if [ ! -f "$MODEL_VENV/bin/activate" ]; then
51- echo "Bootstrapping persistent model venv..."
52- uv venv "$MODEL_VENV" --python 3.10
53- export VIRTUAL_ENV="$MODEL_VENV"
54- export PATH="$MODEL_VENV/bin:$PATH"
55- uv pip install torch==2.9.1 --index-url https://download.pytorch.org/whl/cu130
56- uv pip install numpy transformers tokenizers huggingface_hub ray \
57- uvicorn fastapi pydantic aiohttp requests packaging ninja wheel sccache
58- uv pip install vllm && uv pip uninstall vllm
59- echo "Persistent model venv bootstrapped."
60- else
61- echo "Reusing existing persistent model venv."
62- fi
45+ uv venv .venv --python 3.10
46+ echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
47+ echo "$PWD/.venv/bin" >> $GITHUB_PATH
6348
64- # Activate for subsequent steps
65- echo "VIRTUAL_ENV=$MODEL_VENV" >> $GITHUB_ENV
66- echo "$MODEL_VENV/bin" >> $GITHUB_PATH
49+ # Install torch first (build dep for vLLM)
50+ uv pip install torch==2.9.1 --index-url https://download.pytorch.org/whl/cu130
6751
68- - name : Install kernelbot
69- shell : bash
70- run : |
52+ # Install vLLM to pull in all transitive deps, then remove vllm itself.
53+ # The user's fork gets installed fresh by the benchmark runner.
54+ uv pip install vllm && uv pip uninstall vllm
55+
56+ # Install kernelbot
7157 uv pip install -r "requirements-dev.txt"
7258 uv pip install -e .
7359
7460 - name : Run model benchmark
7561 shell : bash
7662 env :
7763 SETUPTOOLS_SCM_PRETEND_VERSION : " 0.0.1.dev0"
78- SCCACHE_DIR : /opt/sccache
7964 run : |
8065 python3 src/runners/github-runner.py
8166
0 commit comments