ayush2917 commited on
Commit
1fa9651
·
verified ·
1 Parent(s): 14d36a4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -4,7 +4,8 @@ FROM python:3.9-slim
4
  # Set environment variables
5
  ENV PYTHONUNBUFFERED=1 \
6
  PORT=7860 \
7
- HF_HOME=/data/cache
 
8
 
9
  # Install system dependencies
10
  RUN apt-get update && \
@@ -35,11 +36,11 @@ COPY . .
35
  # Expose port
36
  EXPOSE 7860
37
 
38
- # Health check to ensure the app is running
39
- HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
40
  CMD curl -f http://localhost:7860/health || exit 1
41
 
42
- # Run with Gunicorn (adjusted workers and threads)
43
  CMD ["gunicorn", "app:app", \
44
  "--bind", "0.0.0.0:7860", \
45
  "--workers", "2", \
 
4
  # Set environment variables
5
  ENV PYTHONUNBUFFERED=1 \
6
  PORT=7860 \
7
+ HF_HOME=/data/cache \
8
+ IS_BUILDING=true
9
 
10
  # Install system dependencies
11
  RUN apt-get update && \
 
36
  # Expose port
37
  EXPOSE 7860
38
 
39
+ # Health check to ensure the app is running (increased start period)
40
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
41
  CMD curl -f http://localhost:7860/health || exit 1
42
 
43
+ # Run with Gunicorn
44
  CMD ["gunicorn", "app:app", \
45
  "--bind", "0.0.0.0:7860", \
46
  "--workers", "2", \