Tulitula commited on
Commit
d8bb3cf
·
verified ·
1 Parent(s): 2e5f07a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.10 slim as base
2
+ FROM python:3.10-slim
3
+
4
+ # System packages (note: use libgl1, not the removed libgl1-mesa-glx)
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ git git-lfs ffmpeg libgl1 libsm6 libxext6 libglib2.0-0 cmake rsync \
7
+ && rm -rf /var/lib/apt/lists/* \
8
+ && git lfs install
9
+
10
+ # Workdir inside the container
11
+ WORKDIR /home/user/app
12
+
13
+ # Install Python deps first (better layer caching)
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the rest of your app
18
+ COPY . .
19
+
20
+ # Gradio needs to bind on 0.0.0.0 in containers
21
+ ENV GRADIO_SERVER_NAME=0.0.0.0
22
+
23
+ # Expose the port Gradio uses
24
+ EXPOSE 7860
25
+
26
+ # Start your app
27
+ CMD ["python", "app.py"]