Spaces:
Sleeping
Sleeping
| FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04 | |
| RUN apt-get update && \ | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
| python3 \ | |
| python3-pip \ | |
| python3-distutils \ | |
| ffmpeg \ | |
| libsndfile1 \ | |
| libavcodec-extra \ | |
| gnupg \ | |
| libcudnn9-cuda-12 \ | |
| git && \ | |
| update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /app | |
| ARG HF_TOKEN | |
| ENV HUGGING_FACE_HUB_TOKEN=${HF_TOKEN} | |
| USER user | |
| RUN pip3 install --user --no-cache-dir "pip<24.1" | |
| RUN pip install --user --no-cache-dir whisperx \ | |
| --force-reinstall | |
| RUN pip install --user --no-cache-dir \ | |
| torch==2.1.2 \ | |
| torchvision==0.16.2 \ | |
| torchaudio==2.1.2 \ | |
| --extra-index-url https://download.pytorch.org/whl/cu121 \ | |
| --force-reinstall | |
| RUN pip install --user --no-cache-dir \ | |
| pyannote.audio==3.1.1 \ | |
| transformers==4.40.1 \ | |
| "numpy<2" | |
| COPY requirements.txt . | |
| RUN pip install --user -r requirements.txt | |
| COPY . /app | |
| WORKDIR /app | |
| CMD ["python3", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |