VizRef / Dockerfile
chenx906's picture
Fix the deployment space problem
4f37f46
Raw
History Blame Contribute Delete
380 Bytes
FROM python:3.9-slim
RUN useradd -m -u 1000 user
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# If not already in requirements.txt:
# RUN pip install --no-cache-dir fastapi uvicorn python-multipart pillow requests
COPY --chown=user:user . .
USER user
EXPOSE 7860
CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "7860"]