App_sperator / Dockerfile
Rsnarsna's picture
Create Dockerfile
99592a5 verified
Raw
History Blame Contribute Delete
413 Bytes
FROM python:3.11-slim
# HuggingFace requires non-root user
RUN useradd -m -u 1000 user
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY --chown=user . .
# Create working dirs
RUN mkdir -p /tmp/sptoolkit && chown -R user /tmp/sptoolkit
USER user
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]