nakas commited on
Commit
2bbd737
·
verified ·
1 Parent(s): c105499

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements file
12
+ COPY requirements.txt .
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy application files
18
+ COPY app.py .
19
+ COPY utils.py .
20
+ COPY templates/ templates/
21
+ COPY static/ static/
22
+
23
+ # Environment variables will be set in the Hugging Face Space UI
24
+ # OPENAI_API_KEY should be added as a secret
25
+
26
+ # Expose port for the application
27
+ EXPOSE 7860
28
+
29
+ # Command to run the application
30
+ CMD ["python", "app.py"]