Ankit19102004 commited on
Commit
50d86ba
·
1 Parent(s): db022b3

Rename dockerfile to Dockerfile for Hugging Face compatibility

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Copy requirements first for better caching
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy application files
15
+ COPY app.py .
16
+ COPY .env .
17
+
18
+ # Initialize api_keys.json if it doesn't exist
19
+ RUN if [ ! -f api_keys.json ]; then echo "{}" > api_keys.json; fi
20
+ RUN chmod 666 api_keys.json
21
+
22
+ # Standard Hugging Face Space port
23
+ EXPOSE 7860
24
+
25
+ # Run the Flask app
26
+ CMD ["python", "app.py"]