File size: 1,003 Bytes
49b1475
e1b1f98
 
49b1475
ed35a92
 
 
49b1475
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ed35a92
 
 
49b1475
e1b1f98
 
49b1475
cfa368c
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
38
39
40
41
42
43
44
45
46
# ===== Base Image =====
FROM python:3.10-slim

# ===== Environment Variables =====
ENV LANG=C.UTF-8 \
    LC_ALL=C.UTF-8 \
    PYTHONUNBUFFERED=1 \
    TORCH_CUDA_ARCH_LIST="6.1;7.5;8.6+PTX"

# ===== System Dependencies =====
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        git \
        wget \
        ffmpeg \
        libsndfile1 \
        build-essential \
        && rm -rf /var/lib/apt/lists/*

# ===== Python Dependencies =====
# Install specific compatible versions
RUN pip install --no-cache-dir --upgrade pip setuptools wheel

RUN pip install --no-cache-dir \
    torch==2.2.0 \
    torchaudio==2.2.0 \
    torchvision==0.15.1 \
    transformers==4.38 \
    gradio>=3.41,<6 \
    sounddevice>=0.4.6 \
    soundfile>=0.12.1 \
    scipy>=1.11 \
    numpy<2 \
    datasets>=2.13 \
    accelerate

# ===== Copy App Code =====
WORKDIR /app
COPY . /app

# ===== Expose Port (for Gradio if needed) =====
EXPOSE 7860

# ===== Entrypoint =====
CMD ["python", "app.py"]