john5050 commited on
Commit
0e8f51f
·
1 Parent(s): 16f010f
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # System dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ libglib2.0-0 \
8
+ libsm6 \
9
+ libxext6 \
10
+ libxrender-dev \
11
+ libgomp1 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Install CPU-only PyTorch first (keeps image small)
15
+ RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
16
+
17
+ # Install rest of dependencies
18
+ COPY requirements.txt .
19
+ RUN pip install -r requirements.txt
20
+
21
+ # Copy project files
22
+ COPY . .
23
+
24
+ # HuggingFace Spaces requires port 7860
25
+ EXPOSE 7860
26
+
27
+ CMD ["python", "app.py"]