"vscode:/vscode.git/clone" did not exist on "ff42d33e9944832a19171967d2edd6c292bdb2d6"
Dockerfile 1.04 KB
Newer Older
1
2
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
3
4
5
6
7
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

ENV DEBIAN_FRONTEND=noninteractive

8
9
10
11
12
13
RUN apt-get -y update && apt-get install -y bash \
    build-essential \
    git \
    git-lfs \
    curl \
    ca-certificates \
14
    libglib2.0-0 \
15
    libsndfile1-dev \
16
17
18
    libgl1 \
    zip \
    wget
19
20

ENV UV_PYTHON=/usr/local/bin/python
21
22

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
23
24
25
26
27
28
29
30
31
32
33
34
35
RUN pip install uv
RUN uv pip install --no-cache-dir \
    torch \
    torchvision \
    torchaudio \
    --extra-index-url https://download.pytorch.org/whl/cpu

RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/diffusers.git@main#egg=diffusers[test]"

# Extra dependencies
RUN uv pip install --no-cache-dir \
    accelerate \
    numpy==1.26.4 \
36
    hf_xet \
37
38
39
40
41
42
43
    setuptools==69.5.1 \
    bitsandbytes \
    torchao \
    gguf \
    optimum-quanto

RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get autoremove && apt-get autoclean
44
45

CMD ["/bin/bash"]