OldServer / Dockerfile
Seniordev22's picture
Update Dockerfile
6218aeb verified
raw
history blame contribute delete
572 Bytes
FROM python:3.10-slim
# System dependencies for OpenCV + Mediapipe (libGL.so.1 fix)
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONUNBUFFERED=1 \
GRADIO_SERVER_NAME=0.0.0.0
WORKDIR $HOME/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY --chown=user . .
EXPOSE 7860
CMD ["python", "app.py"]