banao-tech commited on
Commit
60ce743
·
verified ·
1 Parent(s): 342895e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # HuggingFace Spaces runs as user 1000 — set it up properly
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV PATH="/home/user/.local/bin:$PATH"
7
+
8
+ WORKDIR /app
9
+
10
+ # Copy and install dependencies
11
+ COPY --chown=user requirements.txt .
12
+ RUN pip install --no-cache-dir --upgrade pip && \
13
+ pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy app source
16
+ COPY --chown=user . .
17
+
18
+ # Gradio listens on 7860 by default — HF Docker Spaces expect this port
19
+ EXPOSE 7860
20
+
21
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
22
+ ENV GRADIO_SERVER_PORT="7860"
23
+
24
+ CMD ["python", "app.py"]