ICEFROG96's picture
Create final Hugging Face Space snapshot
7513d63
Raw
History Blame Contribute Delete
677 Bytes
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PORT=7860
ENV ENABLE_PREVIEW_FACE_DETECTOR=0
WORKDIR $HOME/app
RUN pip install --no-cache-dir --upgrade pip
COPY --chown=user requirements.txt $HOME/app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user . $HOME/app
EXPOSE 7860
CMD ["python", "App/app.py"]