jomasego commited on
Commit
5636a13
·
verified ·
1 Parent(s): 3a743e5

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && \
7
+ apt-get install -y --no-install-recommends gcc python3-dev && \
8
+ apt-get clean && \
9
+ rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements first to leverage Docker cache
12
+ COPY requirements-spaces.txt .
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --upgrade pip && \
16
+ pip install --no-cache-dir -r requirements-spaces.txt
17
+
18
+ # Copy the rest of the application
19
+ COPY . .
20
+
21
+ # Set environment variables
22
+ ENV PORT=7860
23
+
24
+ # Start the application
25
+ CMD ["python", "spaces_app.py"]