Dockerfile 1.34 KB
Newer Older
1
2
3
4
5
6
FROM ubuntu:20.04
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
                   python3.10 \
19
                   python3-pip \
20
                   libgl1 \
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
        --extra-index-url https://download.pytorch.org/whl/cpu && \
36
    python3.10 -m uv pip install --no-cache-dir \
37
38
39
40
        accelerate \
        datasets \
        hf-doc-builder \
        huggingface-hub \
Lucain's avatar
Lucain committed
41
        Jinja2 \
42
        librosa \
43
        numpy==1.26.4 \
44
45
        scipy \
        tensorboard \
46
        transformers matplotlib
47

48
CMD ["/bin/bash"]