ceh-vedant commited on
Commit
4e4bada
·
verified ·
1 Parent(s): d5e980f

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # System dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ git ffmpeg libsm6 libxext6 libgl1 \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ WORKDIR /app
9
+
10
+ # Install Python dependencies
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy app
15
+ COPY app.py .
16
+
17
+ # HuggingFace Spaces runs as non-root
18
+ RUN useradd -m -u 1000 user
19
+ USER user
20
+ ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
21
+ WORKDIR /home/user/app
22
+ COPY --chown=user app.py .
23
+
24
+ EXPOSE 7860
25
+
26
+ CMD ["python", "app.py"]