Skip to content

Commit 8ebdcbb

Browse files
author
Mark Saroufim
committed
Fix artifact upload by copying result to mounted volume
- Changed workdir to /workdir (the mounted checkout directory) - Copy result.json to /workdir before container exits - Use uv for Python package management - Clone from buildkite-infrastructure branch
1 parent 78c61c2 commit 8ebdcbb

1 file changed

Lines changed: 24 additions & 26 deletions

File tree

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Kernelbot Evaluation Pipeline for Buildkite
2-
# This pipeline runs real kernel evaluations by cloning the repo and running the evaluator
3-
#
4-
# To use this pipeline:
5-
# 1. Go to your Buildkite pipeline settings
6-
# 2. Paste this YAML in the Steps section
7-
# 3. Submit jobs via BuildkiteLauncher
2+
# Mirrors GitHub runner: clone repo, install deps, run evaluation
83

94
steps:
105
- label: ":rocket: Kernel Evaluation"
@@ -17,53 +12,56 @@ steps:
1712
always-pull: false
1813
gpus: "all"
1914
propagate-environment: true
15+
shell: ["/bin/bash", "-e", "-c"]
2016
environment:
2117
- NVIDIA_VISIBLE_DEVICES
2218
- CUDA_VISIBLE_DEVICES
2319
- KERNELBOT_PAYLOAD
2420
- KERNELBOT_RUN_ID
2521
cpus: "${KERNELBOT_CPUS:-8}"
2622
memory: "${KERNELBOT_MEMORY:-64g}"
23+
workdir: /workdir
2724

2825
command: |
2926
set -e
3027
3128
echo "=== Environment ==="
32-
echo "NVIDIA_VISIBLE_DEVICES=$$NVIDIA_VISIBLE_DEVICES"
33-
echo "KERNELBOT_RUN_ID=$$KERNELBOT_RUN_ID"
29+
echo "NVIDIA_VISIBLE_DEVICES=$NVIDIA_VISIBLE_DEVICES"
30+
echo "KERNELBOT_RUN_ID=$KERNELBOT_RUN_ID"
3431
nvidia-smi -L
3532
3633
echo ""
37-
echo "=== Installing Dependencies ==="
34+
echo "=== Installing System Dependencies ==="
3835
apt-get update -qq
39-
apt-get install -y -qq python3.11 python3.11-venv python3-pip git > /dev/null
36+
apt-get install -y -qq curl ca-certificates git
4037
41-
# Create and activate virtual environment
42-
python3.11 -m venv /tmp/venv
43-
source /tmp/venv/bin/activate
38+
echo ""
39+
echo "=== Installing uv ==="
40+
curl -LsSf https://astral.sh/uv/install.sh | sh
41+
. /root/.local/bin/env
4442
45-
# Install PyTorch and kernelbot
46-
pip install --quiet torch triton numpy scipy
43+
echo ""
44+
echo "=== Cloning Repository ==="
45+
git clone --depth 1 --branch buildkite-infrastructure https://github.com/gpu-mode/kernelbot.git /opt/kernelbot
46+
cd /opt/kernelbot
4747
48-
# Clone kernelbot and install
49-
git clone --depth 1 https://github.com/gpu-mode/kernelbot.git /tmp/kernelbot
50-
cd /tmp/kernelbot
51-
pip install --quiet -e .
48+
echo ""
49+
echo "=== Installing Dependencies ==="
50+
uv sync
5251
5352
echo ""
5453
echo "=== Running Evaluation ==="
55-
python src/runners/buildkite-runner.py
54+
uv run python src/runners/buildkite-runner.py
5655
5756
echo ""
57+
echo "=== Copying Artifacts ==="
58+
cp result.json /workdir/result.json
59+
cp -r profile_data /workdir/profile_data 2>/dev/null || true
60+
5861
echo "=== Done ==="
5962
6063
artifact_paths:
6164
- "result.json"
62-
- "profile_data/**/*"
65+
- "profile_data/*"
6366

6467
timeout_in_minutes: 30
65-
66-
retry:
67-
automatic:
68-
- exit_status: -1
69-
limit: 2

0 commit comments

Comments
 (0)