5
File size: 798 Bytes
bc8ba05
1fec76d
 
 
 
 
 
 
 
bc8ba05
 
1fec76d
bc8ba05
 
 
 
 
 
 
 
 
1fec76d
 
 
 
bc8ba05
1fec76d
 
 
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
27
28
29
30
FROM python:3.10-slim-bookworm

# System tools
RUN apt-get update && apt-get install -y \
    ffmpeg \
    libsndfile1 \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
ENV ENABLE_CLONE_ENGINES=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1

# Docker profile runs the CPU voice-clone backend.
COPY requirements*.txt ./
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cpu "torch==2.5.1+cpu" && \
    if [ -f requirements-docker.txt ]; then \
        pip install --no-cache-dir -r requirements-docker.txt; \
    else \
        pip install --no-cache-dir -r requirements.txt; \
    fi

# Copy app
COPY app.py .

# Hugging Face Spaces runs on port 7860
EXPOSE 7860

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]