Michael Rabinovich Cursor commited on
Commit
8e88c32
·
1 Parent(s): 00204b3

dockerfile: build cadgenbench from main with commit-endpoint cache-bust

Browse files

Track @main pre-v1 and re-fetch the GitHub commits endpoint so BuildKit
invalidates the pip layer whenever main moves (no more first-build pin).

Co-authored-by: Cursor <cursoragent@cursor.com>

Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -45,10 +45,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
45
  RUN python -m ensurepip --upgrade \
46
  && python -m pip install --no-cache-dir --upgrade pip
47
 
48
- # cadgenbench from the Public GitHub repo, same convention and
49
- # ARG name as the leaderboard Dockerfile. Bump CADGENBENCH_SHA in
50
- # lockstep with cadgenbench releases.
51
- ARG CADGENBENCH_SHA=b22a53c
 
 
 
 
 
 
52
  RUN python -m pip install --no-cache-dir \
53
  "cadgenbench @ git+https://github.com/huggingface/cadgenbench.git@${CADGENBENCH_SHA}"
54
 
 
45
  RUN python -m ensurepip --upgrade \
46
  && python -m pip install --no-cache-dir --upgrade pip
47
 
48
+ # cadgenbench from the Public GitHub repo, same convention and ARG name
49
+ # as the leaderboard Dockerfile. Defaults to `main` (every rebuild picks
50
+ # up latest, pre-v1); lock to a commit SHA at the v1 release for
51
+ # reproducible scores (see space-setup/post-gt-swap.md Stage F).
52
+ ARG CADGENBENCH_SHA=main
53
+ # Cache-bust the install below whenever the tracked ref moves (the
54
+ # GitHub commits endpoint's response changes per commit, so BuildKit
55
+ # re-fetches and invalidates the cached pip layer). Without it `@main`
56
+ # stays pinned to first-build HEAD. A no-op for a fixed commit SHA.
57
+ ADD https://api.github.com/repos/huggingface/cadgenbench/commits/${CADGENBENCH_SHA} /tmp/cadgenbench.commit
58
  RUN python -m pip install --no-cache-dir \
59
  "cadgenbench @ git+https://github.com/huggingface/cadgenbench.git@${CADGENBENCH_SHA}"
60