File size: 583 Bytes
fd87dec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Hugging Face Spaces (Docker SDK) — see README.md for the YAML config block
# that tells the Space to build this image and route traffic to port 7860.
FROM python:3.11-slim

# HF Spaces containers run as a non-root user with UID 1000
RUN useradd -m -u 1000 user
ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app

COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

COPY --chown=user . /app

USER user

ENV PORT=7860 \
    FLASK_DEBUG=0

EXPOSE 7860

CMD ["python", "app.py"]