busy-module-audio / Dockerfile
EurekaPotato's picture
Upload folder using huggingface_hub
9d8ae5e verified
raw
history blame contribute delete
642 Bytes
FROM python:3.10-slim
WORKDIR /app
# System dependencies for audio processing + git for torch.hub
RUN apt-get update && apt-get install -y \
libsndfile1 \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
# Install CPU-only torch first (prevents CUDA downloads)
RUN pip install --no-cache-dir torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0+cpu \
--extra-index-url https://download.pytorch.org/whl/cpu
# Install other dependencies
RUN pip install -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["uvicorn", "handler:app", "--host", "0.0.0.0", "--port", "7860"]