Speedofmastery commited on
Commit
90633b1
·
1 Parent(s): 12b6328

Auto-commit: Dockerfile updated

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -32
Dockerfile CHANGED
@@ -10,39 +10,13 @@ ENV HOME=/home/user \
10
  # Set working directory
11
  WORKDIR /app
12
 
13
- # Copy requirements first for better caching
14
  COPY --chown=user requirements.txt .
15
  RUN pip install --no-cache-dir --upgrade pip && \
16
- pip install --no-cache-dir --upgrade -r requirements.txt
17
 
18
- # Copy application code
19
- COPY --chown=user . .
20
 
21
- # Create necessary directories
22
- RUN mkdir -p logs data cache
23
-
24
- # Set environment variables for the application
25
- ENV PYTHONPATH=$HOME/app
26
- ENV GRADIO_SERVER_NAME=0.0.0.0
27
- ENV GRADIO_SERVER_PORT=7860
28
-
29
- # Cloudflare configuration (to be set in Space settings)
30
- ENV CLOUDFLARE_API_TOKEN=""
31
- ENV CLOUDFLARE_ACCOUNT_ID=""
32
- ENV CLOUDFLARE_D1_DATABASE_ID=""
33
- ENV CLOUDFLARE_R2_BUCKET_NAME=""
34
- ENV CLOUDFLARE_KV_NAMESPACE_ID=""
35
- ENV CLOUDFLARE_DURABLE_OBJECTS_ID=""
36
-
37
- # Expose port
38
- EXPOSE 7860
39
-
40
- # Make startup script executable
41
- RUN chmod +x start.sh
42
-
43
- # Health check
44
- HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \
45
- CMD curl -f http://localhost:7860/ || exit 1
46
-
47
- # Use startup script for better Linux compatibility
48
- CMD ["./start.sh"]
 
10
  # Set working directory
11
  WORKDIR /app
12
 
13
+ # Copy and install requirements
14
  COPY --chown=user requirements.txt .
15
  RUN pip install --no-cache-dir --upgrade pip && \
16
+ pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Copy application
19
+ COPY --chown=user . /app
20
 
21
+ # Run app
22
+ CMD ["python", "app.py"]