Spaces:
Sleeping
Sleeping
File size: 523 Bytes
58de15f 2be3a40 58de15f 2be3a40 a48b234 5415e8c 58de15f 2be3a40 58de15f 2be3a40 58de15f 2be3a40 5415e8c 2be3a40 58de15f 2be3a40 58de15f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
FROM python:3.11-slim
WORKDIR /code
# --- MODIFIED: Use the correct, modern environment variable ---
# This tells ALL Hugging Face libraries where to store cache files.
ENV HF_HOME="/code/data/cache"
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./ /code/
# Create the data and cache directories and make them writable
RUN mkdir -p data/cache && chmod -R 777 data
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |