Dockerfile 1.11 KB
Newer Older
1
FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
Dhruv Nair's avatar
Dhruv Nair committed
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 \
Sayak Paul's avatar
Sayak Paul committed
19
20
    python3.9 \
    python3.9-dev \
21
    python3-pip \
Sayak Paul's avatar
Sayak Paul committed
22
    python3.9-venv && \
Dhruv Nair's avatar
Dhruv Nair committed
23
24
25
    rm -rf /var/lib/apt/lists

# make sure to use venv
Sayak Paul's avatar
Sayak Paul committed
26
RUN python3.9 -m venv /opt/venv
Dhruv Nair's avatar
Dhruv Nair committed
27
28
29
ENV PATH="/opt/venv/bin:$PATH"

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
Sayak Paul's avatar
Sayak Paul committed
30
31
RUN python3.9 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
    python3.9 -m uv pip install --no-cache-dir \
32
33
34
    torch \
    torchvision \
    torchaudio \
35
    invisible_watermark && \
Sayak Paul's avatar
Sayak Paul committed
36
    python3.9 -m pip install --no-cache-dir \
37
38
39
40
41
42
    accelerate \
    datasets \
    hf-doc-builder \
    huggingface-hub \
    Jinja2 \
    librosa \
43
    numpy==1.26.4 \
44
45
    scipy \
    tensorboard \
46
47
    transformers

Dhruv Nair's avatar
Dhruv Nair committed
48
CMD ["/bin/bash"]