HimAJ commited on
Commit
9831a8e
·
verified ·
1 Parent(s): 11a78de

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -24,7 +24,7 @@ RUN pip install --no-cache-dir -r requirements.txt
24
  # Copy all app code
25
  COPY . /app/
26
 
27
- # Handle entrypoint script (rename if needed and make executable
28
  RUN if [ -f /app/scripts/entrypoint_hf.sh ]; then \
29
  mv /app/scripts/entrypoint_hf.sh /app/scripts/entrypoint.sh; \
30
  fi && \
@@ -35,6 +35,5 @@ RUN if [ -f /app/scripts/entrypoint_hf.sh ]; then \
35
  # Hugging Face Spaces uses port 7860
36
  EXPOSE 7860
37
 
38
- # Use entrypoint if exists, otherwise run main.py directly
39
- ENTRYPOINT ["/bin/sh", "-c"]
40
- CMD ["if [ -f /app/scripts/entrypoint.sh ]; then exec /app/scripts/entrypoint.sh; else PORT=7860 exec python main.py; fi"]
 
24
  # Copy all app code
25
  COPY . /app/
26
 
27
+ # Handle entrypoint (rename if needed, then make executable)
28
  RUN if [ -f /app/scripts/entrypoint_hf.sh ]; then \
29
  mv /app/scripts/entrypoint_hf.sh /app/scripts/entrypoint.sh; \
30
  fi && \
 
35
  # Hugging Face Spaces uses port 7860
36
  EXPOSE 7860
37
 
38
+ # Use entrypoint script - this will download models and start the app
39
+ ENTRYPOINT ["/app/scripts/entrypoint.sh"]