Skip to content

Commit ec00f7c

Browse files
authored
Merge pull request #60 from interscript/fix/image-order
fix(api): add_local_* last — env() after them fails the Modal build
2 parents 690fd54 + 286f1cb commit ec00f7c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/api/inference.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818

1919
_REPO_ROOT = Path(__file__).resolve().parent.parent.parent
2020

21+
# add_local_* must come last (no build steps after them)
2122
image = (
2223
modal.Image.debian_slim(python_version="3.11")
2324
.pip_install("onnxruntime==1.23.2", "pyyaml>=6.0", "fastapi>=0.115")
25+
.workdir("/root/interscript-ml")
26+
.env({"IMAGE_REV": "6"})
2427
.add_local_dir(str(Path(__file__).resolve().parent.parent), "/root/interscript-ml", copy=True)
2528
# deterministic mounts for the index-driven resolver + the index itself
2629
.add_local_file(str(Path(__file__).resolve().parent / "model_resolution.py"), "/root/model_resolution.py")
2730
.add_local_file(str(_REPO_ROOT / "models.yaml"), "/root/models.yaml")
28-
.workdir("/root/interscript-ml")
29-
.env({"IMAGE_REV": "6"})
3031
)
3132

3233
app = modal.App("interscript-inference", image=image)

0 commit comments

Comments
 (0)