File size: 948 Bytes
5f4ecf6
cbb31c6
 
 
 
 
 
 
 
 
 
 
5f4ecf6
 
 
 
 
 
 
 
 
cbb31c6
 
 
5f4ecf6
 
 
 
 
cbb31c6
 
 
 
 
 
 
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
FROM nvidia/cuda:12.6.1-cudnn-runtime-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
ENV MPLCONFIGDIR=/tmp/matplotlib
ENV HF_HOME=/tmp/.huggingface

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
    python3 \
    python3-pip \
    python3-dev \
    python3-venv \
    ffmpeg \
    git \
    && ln -sf /usr/bin/python3 /usr/bin/python \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt /app/requirements.txt

RUN python -m pip install --upgrade pip==24.3.1 setuptools==75.8.0 wheel==0.45.1 && \
    pip install --no-cache-dir \
      torch==2.8.0 torchaudio==2.8.0 torchvision==0.23.0 \
      --index-url https://download.pytorch.org/whl/cu126 && \
    pip install --no-cache-dir -r /app/requirements.txt

COPY app.py /app/app.py
COPY README.md /app/README.md

EXPOSE 7860

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