Spaces:
Paused
Paused
File size: 586 Bytes
4b2a21a dd90875 53dcff5 dd90875 53dcff5 48b12c9 42f5736 53dcff5 dd90875 53dcff5 dd90875 53dcff5 42f5736 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM python:3.10
# 1. Create a writable cache directory for huggingface_hub
RUN mkdir -p /tmp/huggingface_cache
ENV HUGGINGFACE_HUB_CACHE=/tmp/huggingface_cache
# 2. Create a writable cache directory for Numba (used by rembg/pymatting)
RUN mkdir -p /tmp/numba_cache
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
ENV NUMBA_DISABLE_JIT=1
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . /app/
# 3. Expose port 7860 for Hugging Face
EXPOSE 7860
# 4. Run your main.py (which calls uvicorn.run inside the __main__ block)
CMD ["python", "main.py"]
|