metanice / Dockerfile
mac9087's picture
Update Dockerfile
833bda9 verified
raw
history blame contribute delete
448 Bytes
FROM python:3.10-slim
WORKDIR /app
# Environment fixes for all cache issues
ENV NUMBA_CACHE_DIR=/tmp
ENV NUMBA_DISABLE_CACHE=1
ENV HF_HOME=/tmp/huggingface
ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers
ENV TORCH_HOME=/tmp/torch
ENV XDG_CACHE_HOME=/tmp
ENV MPLCONFIGDIR=/tmp/matplotlib
ENV TTS_HOME=/tmp/tts
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
EXPOSE 7860
CMD ["python", "app.py"]