File tree Expand file tree Collapse file tree
spaces/imagenette-clip-hycoclip Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,10 +21,11 @@ WORKDIR $HOME/app
2121
2222RUN pip install --upgrade pip
2323
24- # Install latest releases from PyPI.
24+ # Install latest releases from PyPI (split for better build caching & logging) .
2525# For reproducible builds, pin versions here:
26- # RUN pip install --upgrade hyperview==0.1.1 hyper-models==0.1.0
27- RUN pip install --upgrade hyperview hyper-models
26+ # RUN pip install hyperview==0.1.1 hyper-models==0.1.0
27+ RUN pip install hyperview && python -c "import hyperview; print('hyperview', hyperview.__version__)"
28+ RUN pip install hyper-models && python -c "import hyper_models; print('hyper_models', hyper_models.__version__)"
2829
2930COPY --chown=user demo.py ./demo.py
3031
@@ -41,7 +42,7 @@ ENV HOST=0.0.0.0 \
4142
4243EXPOSE 7860
4344
44- HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
45+ HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
4546 CMD curl -f http://localhost:7860/__hyperview__/health || exit 1
4647
4748CMD ["python" , "demo.py" ]
Original file line number Diff line number Diff line change @@ -121,7 +121,13 @@ def main() -> None:
121121
122122 if len (dataset ) == 0 or not dataset .list_layouts ():
123123 print ("Preparing demo dataset..." )
124- _ensure_demo_ready (dataset )
124+ try :
125+ _ensure_demo_ready (dataset )
126+ except Exception as exc :
127+ import traceback
128+ traceback .print_exc ()
129+ print (f"\n FATAL: demo setup failed: { type (exc ).__name__ } : { exc } " , file = sys .stderr )
130+ sys .exit (1 )
125131 else :
126132 print (
127133 f"Loaded cached dataset '{ DATASET_NAME } ' with "
You can’t perform that action at this time.
0 commit comments