Dockerfile 1.12 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
17
18
    build-essential \
    git \
    git-lfs \
    curl \
    ca-certificates \
    libsndfile1-dev \
    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
32
33
    torch \
    torchvision \
    torchaudio \
34
    invisible_watermark && \
35
    python3.10 -m pip install --no-cache-dir \
36
37
38
39
40
41
    accelerate \
    datasets \
    hf-doc-builder \
    huggingface-hub \
    Jinja2 \
    librosa \
42
    numpy==1.26.4 \
43
44
45
    scipy \
    tensorboard \
    transformers \
Dhruv Nair's avatar
Dhruv Nair committed
46
    pytorch-lightning
47

48
CMD ["/bin/bash"]