Skip to content

Commit 8d76fee

Browse files
committed
fix: make precompute non-fatal during build (fallback to runtime)
1 parent fd34509 commit 8d76fee

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

spaces/imagenette-clip-hycoclip/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ ENV HYPERVIEW_DATASETS_DIR=/home/user/app/demo_data/datasets \
3535
HYPERVIEW_MEDIA_DIR=/home/user/app/demo_data/media \
3636
DEMO_SAMPLES=${DEMO_SAMPLES}
3737

38-
RUN python demo.py --precompute
38+
# Precompute at build time so the Space starts fast.
39+
# If this fails, the app will still compute at startup (slower first launch).
40+
RUN python demo.py --precompute || echo "WARNING: precompute failed, will compute at startup"
3941

4042
ENV HOST=0.0.0.0 \
4143
PORT=7860

0 commit comments

Comments
 (0)