File size: 732 Bytes
523a2e0
9a33b59
 
 
e38990c
1e735bc
9a33b59
 
 
 
 
 
 
 
523a2e0
 
 
9a33b59
1e735bc
9a33b59
 
 
 
a7db03c
 
 
 
 
 
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
FROM python:3.11-slim

WORKDIR /app

# System dependencies (CPU-only, no CUDA)
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
    pkg-config \
    libsndfile1 \
    && rm -rf /var/lib/apt/lists/*

# Copy project files
COPY . /app/

# Install dependencies using binary wheels where available to reduce build RAM.
ENV PIP_NO_BUILD_ISOLATION=1
ENV PIP_DEFAULT_TIMEOUT=100
RUN pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir --prefer-binary -r requirements-spaces.txt

EXPOSE 7860

CMD ["python3", "app.py"]

RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    pkg-config \
    libsndfile1 \
    && rm -rf /var/lib/apt/lists/*