Spaces:
Running
Running
FROM python:3.10-slim | |
RUN apt-get update && apt-get install -y \ | |
libglib2.0-0 \ | |
libgl1-mesa-glx \ | |
libsm6 \ | |
libxext6 \ | |
libxrender-dev \ | |
git \ | |
&& rm -rf /var/lib/apt/lists/* | |
WORKDIR /app | |
RUN useradd -m appuser | |
RUN chown -R appuser:appuser /app | |
RUN mkdir -p /tmp/matplotlib /tmp/torchxrayvision | |
RUN chown -R appuser:appuser /tmp/matplotlib /tmp/torchxrayvision | |
COPY --chown=appuser:appuser . . | |
RUN pip install --no-cache-dir -r requirements.txt | |
USER appuser | |
EXPOSE 7860 | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |