File size: 642 Bytes
55e88f4
 
 
 
9d8ae5e
 
 
 
 
 
 
55e88f4
9d8ae5e
 
 
 
 
 
2110638
55e88f4
c431263
55e88f4
 
 
9d8ae5e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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"]