File tree Expand file tree Collapse file tree 2 files changed +55
-4
lines changed
docker/diffusers-doc-builder Expand file tree Collapse file tree 2 files changed +55
-4
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,17 @@ jobs:
2525 steps :
2626 - name : Set up Docker Buildx
2727 uses : docker/setup-buildx-action@v1
28-
28+
2929 - name : Check out code
3030 uses : actions/checkout@v3
31-
31+
3232 - name : Find Changed Dockerfiles
3333 id : file_changes
3434 uses : jitterbit/get-changed-files@v1
3535 with :
3636 format : ' space-delimited'
3737 token : ${{ secrets.GITHUB_TOKEN }}
38-
38+
3939 - name : Build Changed Docker Images
4040 run : |
4141 CHANGED_FILES="${{ steps.file_changes.outputs.all }}"
5252 build-and-push-docker-images :
5353 runs-on : [ self-hosted, intel-cpu, 8-cpu, ci ]
5454 if : github.event_name != 'pull_request'
55-
55+
5656 permissions :
5757 contents : read
5858 packages : write
6969 - diffusers-flax-tpu
7070 - diffusers-onnxruntime-cpu
7171 - diffusers-onnxruntime-cuda
72+ - diffusers-doc-builder
7273
7374 steps :
7475 - name : Checkout repository
Original file line number Diff line number Diff line change 1+ FROM ubuntu:20.04
2+ LABEL maintainer="Hugging Face"
3+ LABEL repository="diffusers"
4+
5+ ENV DEBIAN_FRONTEND=noninteractive
6+
7+ RUN apt-get -y update \
8+ && apt-get install -y software-properties-common \
9+ && add-apt-repository ppa:deadsnakes/ppa
10+
11+ RUN apt install -y bash \
12+ build-essential \
13+ git \
14+ git-lfs \
15+ curl \
16+ ca-certificates \
17+ libsndfile1-dev \
18+ python3.10 \
19+ python3-pip \
20+ libgl1 \
21+ python3.10-venv && \
22+ rm -rf /var/lib/apt/lists
23+
24+ # make sure to use venv
25+ RUN python3.10 -m venv /opt/venv
26+ ENV PATH="/opt/venv/bin:$PATH"
27+
28+ # pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
29+ RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
30+ python3.10 -m uv pip install --no-cache-dir \
31+ torch \
32+ torchvision \
33+ 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+ accelerate \
38+ datasets \
39+ hf-doc-builder \
40+ huggingface-hub \
41+ Jinja2 \
42+ librosa \
43+ numpy \
44+ scipy \
45+ tensorboard \
46+ transformers \
47+ matplotlib \
48+ setuptools==69.5.1
49+
50+ CMD ["/bin/bash" ]
You can’t perform that action at this time.
0 commit comments