"vscode:/vscode.git/clone" did not exist on "8b8a339c4943fd1fe5a2928076626f088afc8566"
Dockerfile 1.38 KB
Newer Older
1
FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
2
3
4
5
6
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

ENV DEBIAN_FRONTEND=noninteractive

7
8
9
10
11
RUN apt-get -y update \
    && apt-get install -y software-properties-common \
    && add-apt-repository ppa:deadsnakes/ppa

RUN apt install -y bash \
12
13
14
15
16
                   build-essential \
                   git \
                   git-lfs \
                   curl \
                   ca-certificates \
17
                   libsndfile1-dev \
18
                   libgl1 \
19
                   python3.10 \
20
                   python3-pip \
21
                   python3.10-venv && \
22
23
24
    rm -rf /var/lib/apt/lists

# make sure to use venv
25
RUN python3.10 -m venv /opt/venv
26
27
28
ENV PATH="/opt/venv/bin:$PATH"

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
29
30
RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
    python3.10 -m uv pip install --no-cache-dir \
31
        torch \
32
33
        torchvision \
        torchaudio \
34
35
        "onnxruntime-gpu>=1.13.1" \
        --extra-index-url https://download.pytorch.org/whl/cu117 && \
36
    python3.10 -m uv pip install --no-cache-dir \
37
38
39
40
        accelerate \
        datasets \
        hf-doc-builder \
        huggingface-hub \
41
        hf_xet \
Lucain's avatar
Lucain committed
42
        Jinja2 \
43
        librosa \
44
        numpy==1.26.4 \
45
46
        scipy \
        tensorboard \
47
        transformers
48
49

CMD ["/bin/bash"]