iris-eye / Dockerfile
morefaat69's picture
Upload 4 files
7119cd3 verified
Raw
History Blame Contribute Delete
842 Bytes
FROM python:3.10-slim
# ── System deps ──
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
# ── Non-root user required by Hugging Face Spaces ──
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONUNBUFFERED=1
WORKDIR /home/user/app
# ── Install Python deps ──
COPY --chown=user requirements.txt ./
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Copy app source
COPY --chown=user . .
# Expose port (Hugging Face Spaces uses 7860) ──
EXPOSE 7860
# ── Start server ──
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]