Skip to content

Commit 338c8b4

Browse files
Dockerfile fix
1 parent c17f812 commit 338c8b4

2 files changed

Lines changed: 20 additions & 11 deletions

File tree

.dockerignore

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# The image only needs demo/, gridworld/, interface/, mazes/, scripts/ (see
2-
# Dockerfile). Everything below is either excluded by that or is build noise
3-
# that would bloat the layer and bust the cache on every commit.
1+
# The image only needs demo/, gridworld/, interface/, scripts/, and
2+
# ogbench/ogbench/procgen/maze_jsons/ (see Dockerfile). Everything below is
3+
# either excluded by that or is build noise that would bloat the layer and
4+
# bust the cache on every commit.
45

56
.git
67
.gitignore
@@ -27,7 +28,14 @@ analysis/
2728
adapters/
2829
cross_domain/
2930
multigrid/
30-
ogbench/
31+
# ogbench Python code is not imported; only procgen/maze_jsons/ is copied into
32+
# the image. Exclude the rest of the submodule to keep the build context small.
33+
ogbench/*
34+
!ogbench/ogbench/
35+
ogbench/ogbench/*
36+
!ogbench/ogbench/procgen/
37+
ogbench/ogbench/procgen/*
38+
!ogbench/ogbench/procgen/maze_jsons/
3139
deploy/
3240
lib/
3341
*.sh

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# MultiNet MiniGrid play API - the backend behind the playable maze on
22
# multinet.ai.
33
#
4-
# Local:
4+
# Local (init the ogbench submodule first — it carries the R1 maze corpus):
5+
# git submodule update --init
56
# docker build -t multinet-maze .
67
# docker run -p 8080:8080 -e MULTINET_CORS_ORIGINS=http://127.0.0.1:8899 multinet-maze
78
#
@@ -43,27 +44,27 @@ RUN pip install --upgrade pip && \
4344
#
4445
# demo/data/ carries the vendored R1 results table; there is no sibling
4546
# Multinet-v2-results checkout inside an image and R1ResultCatalog raises
46-
# FileNotFoundError without it. mazes/ holds the 42 task JSONs that the
47-
# manifest's `source` fields point at.
47+
# FileNotFoundError without it. The R1 manifest resolves all 42 playable tasks
48+
# under ogbench/ogbench/procgen/maze_jsons/ (same corpus as local dev).
4849
COPY demo/ ./demo/
4950
COPY gridworld/ ./gridworld/
5051
COPY interface/ ./interface/
5152
COPY pipeline/ ./pipeline/
5253
COPY prompting_experiments/ ./prompting_experiments/
5354
COPY scorer/ ./scorer/
5455
COPY scripts/ ./scripts/
55-
COPY mazes/ ./mazes/
56+
COPY ogbench/ogbench/procgen/maze_jsons/ ./ogbench/ogbench/procgen/maze_jsons/
5657
COPY model_interface.py ./
5758

5859
# Fail the build rather than the deploy. The task count is asserted, not just
5960
# printed: load_manifest_tasks skips manifest rows whose `source` file is
60-
# missing with a warning rather than an error, so a dropped mazes/ directory
61-
# would otherwise produce a container that boots happily and serves zero mazes.
61+
# missing with a warning rather than an error, so a missing maze corpus would
62+
# otherwise produce a container that boots happily and serves zero mazes.
6263
RUN python -c "\
6364
import demo.api.app; \
6465
from demo.r1_tasks import list_r1_tasks; \
6566
n = len(list_r1_tasks()); \
66-
assert n == 42, 'expected 42 R1 tasks, got %d - check mazes/ and the manifest' % n; \
67+
assert n == 42, 'expected 42 R1 tasks, got %d - check ogbench maze_jsons and the manifest' % n; \
6768
print('import ok,', n, 'tasks')"
6869

6970
# Cloud Run injects PORT and ignores EXPOSE; 8080 is its default and a fine

0 commit comments

Comments
 (0)