ADK09's picture
Initial Commit
5c50bbf
raw
history blame contribute delete
425 Bytes
FROM python:3.9-slim
RUN useradd -m -u 1000 user
USER user
ENV HF_HOME=/app/cache
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user:user requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN mkdir -p /app/cache && chown -R user:user /app/cache
COPY --chown=user:user . /app
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]