From 286f1cb32fa7e346c65ff90fb768f2b89e2be624 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Fri, 28 Aug 2026 12:58:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(api):=20add=5Flocal=5F*=20last=20=E2=80=94?= =?UTF-8?q?=20env()=20after=20them=20fails=20the=20Modal=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reorder deploy had been silently failing on image build rules, leaving the pre-fix deployment serving. --- src/api/inference.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/inference.py b/src/api/inference.py index b54911f..d82492a 100644 --- a/src/api/inference.py +++ b/src/api/inference.py @@ -18,15 +18,16 @@ _REPO_ROOT = Path(__file__).resolve().parent.parent.parent +# add_local_* must come last (no build steps after them) image = ( modal.Image.debian_slim(python_version="3.11") .pip_install("onnxruntime==1.23.2", "pyyaml>=6.0", "fastapi>=0.115") + .workdir("/root/interscript-ml") + .env({"IMAGE_REV": "6"}) .add_local_dir(str(Path(__file__).resolve().parent.parent), "/root/interscript-ml", copy=True) # deterministic mounts for the index-driven resolver + the index itself .add_local_file(str(Path(__file__).resolve().parent / "model_resolution.py"), "/root/model_resolution.py") .add_local_file(str(_REPO_ROOT / "models.yaml"), "/root/models.yaml") - .workdir("/root/interscript-ml") - .env({"IMAGE_REV": "6"}) ) app = modal.App("interscript-inference", image=image)