Spaces:
Sleeping
Sleeping
FROM python:3.10-slim | |
WORKDIR /api | |
COPY . /api | |
RUN apt-get update && apt-get install -y \ | |
libgl1-mesa-glx \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 | |
RUN pip install -r requirements.txt | |
RUN mkdir -p /.cache /root/.cache /tmp/.cache /api/.cache && \ | |
chmod -R 777 /.cache /root/.cache /tmp/.cache /api/.cache | |
ENV MPLCONFIGDIR=/tmp/.cache/matplotlib | |
ENV HUGGINGFACE_HUB_CACHE=/tmp/.cache/huggingface | |
RUN chmod -R 777 /api /tmp /root /.cache | |
EXPOSE 7860 | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |