vivamais / Dockerfile
marinarosa's picture
Fix HF hub cache permission errors on Space
27b6052
Raw
History Blame Contribute Delete
336 Bytes
FROM python:3.11-slim
WORKDIR /app
ENV HF_HOME=/app/.cache/huggingface
ENV HUGGINGFACE_HUB_CACHE=/app/.cache/huggingface/hub
ENV TMPDIR=/app/.cache/tmp
RUN mkdir -p /app/.cache/huggingface/hub /app/.cache/tmp
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["python", "app.py"]