Divyasri-18 commited on
Commit
412e2d1
·
verified ·
1 Parent(s): 25c7419

Upload Dockerfile

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