File size: 847 Bytes
c04f61c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
# ── Base image ──
FROM python:3.10-slim

# ── System dependencies ──
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    libsndfile1 \
    ffmpeg \
    curl \
    git \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# ── Upgrade pip ──
RUN pip install --upgrade pip

# ── Install Python packages from requirements.txt ──
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt

# ── Set working directory ──
WORKDIR /app

# ── Copy the application ──
COPY app.py .

# ── Environment variables ──
ENV COQUI_TOS_AGREED=1
ENV HF_HOME=/app/.cache/huggingface
ENV OMP_NUM_THREADS=4
ENV MKL_NUM_THREADS=4

# ── Expose port ──
EXPOSE 7860

# ── Run the app ──
CMD ["python", "app.py"]