RenAI / Dockerfile
Arsh124's picture
Added support for HF-Model
9a88738
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
libgtk-3-0 \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
&& rm -rf /var/lib/apt/lists/*
RUN useradd user
USER user
ENV HOME=/home/user \
PATH="/home/user/.local/bin:$PATH" \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
WORKDIR $HOME/app
COPY requirements.txt .
RUN pip install --no-cache-dir --timeout=100 -r requirements.txt
COPY --chown=user ./ $HOME/app
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host=0.0.0.0", "--port=7860"]