Speedofmastery commited on
Commit
599078b
·
1 Parent(s): fa3e081

Auto-commit: Dockerfile updated

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -16
Dockerfile CHANGED
@@ -24,22 +24,30 @@ ENV HOME=/home/user \
24
  WORKDIR $HOME/app
25
 
26
  # Copy requirements and install dependencies
27
- COPY --chown=user requirements.txt .
28
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
29
-
30
- COPY --chown=user . /app
31
-
32
- # HuggingFace environment variables
33
- ENV HF_TOKEN=""
34
- ENV HF_API_BASE="https://api-inference.huggingface.co"
35
-
36
- # Application configuration
37
- ENV OPENAI_API_KEY=""
38
- ENV ANTHROPIC_API_KEY=""
39
- ENV LOG_LEVEL="INFO"
40
-
41
- # Expose ports
42
- EXPOSE 7860 8000
 
 
 
 
 
 
 
 
43
 
44
  # Health check
45
  HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \
 
24
  WORKDIR $HOME/app
25
 
26
  # Copy requirements and install dependencies
27
+ RUN pip install --no-cache-dir --upgrade pip && \
28
+ pip install --no-cache-dir --upgrade -r requirements.txt
29
+
30
+ # Copy application code
31
+ COPY --chown=user . .
32
+
33
+ # Create necessary directories
34
+ RUN mkdir -p logs data cache
35
+
36
+ # Set environment variables for the application
37
+ ENV PYTHONPATH=$HOME/app
38
+ ENV GRADIO_SERVER_NAME=0.0.0.0
39
+ ENV GRADIO_SERVER_PORT=7860
40
+
41
+ # Cloudflare configuration (to be set in Space settings)
42
+ ENV CLOUDFLARE_API_TOKEN=""
43
+ ENV CLOUDFLARE_ACCOUNT_ID=""
44
+ ENV CLOUDFLARE_D1_DATABASE_ID=""
45
+ ENV CLOUDFLARE_R2_BUCKET_NAME=""
46
+ ENV CLOUDFLARE_KV_NAMESPACE_ID=""
47
+ ENV CLOUDFLARE_DURABLE_OBJECTS_ID=""
48
+
49
+ # Expose port
50
+ EXPOSE 7860
51
 
52
  # Health check
53
  HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \