Spaces:
Running
Running
FROM python:3.10-slim | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV NUMBA_DISABLE_CACHE=1 | |
ENV NUMBA_CACHE_DIR=/tmp/numba_cache | |
ENV MPLCONFIGDIR=/tmp/matplotlib | |
ENV XDG_CACHE_HOME=/tmp/.cache | |
ENV TRANSFORMERS_CACHE=/tmp/huggingface | |
ENV HF_HOME=/tmp/huggingface | |
ENV XDG_CONFIG_HOME=/tmp/.config | |
ENV XDG_DATA_HOME=/tmp/.data | |
ENV TORCH_HOME=/tmp/torch | |
ENV PYTORCH_TRANSFORMERS_CACHE=/tmp/torch_transformers | |
ENV PYTHON_EGG_CACHE=/tmp/.python-eggs | |
WORKDIR /app | |
RUN apt-get update && apt-get install -y \ | |
git ffmpeg libsndfile1 espeak-ng \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir --upgrade pip \ | |
&& pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
RUN mkdir -p /tmp/mpl_cache /tmp/.cache /tmp/huggingface /tmp/.config /tmp/.data /tmp/torch /tmp/torch_transformers /tmp/.python-eggs /tmp/numba_cache | |
EXPOSE 7860 | |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |