Closed harrywang closed 1 year ago
I was able to build this using Ubuntu 20.04.5 LTS:
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 3.64kB 0.0s
=> [internal] load metadata for docker.io/library/python:3.10.9-slim 0.6s
=> [internal] load metadata for docker.io/alpine/git:2.36.2 0.5s
=> [internal] load build context 0.1s
=> => transferring context: 3.39kB 0.0s
=> [download 1/7] FROM docker.io/alpine/git:2.36.2@sha256:ec491c893597b68c92b88023827faa771772cfd5e106b76c713fa5e1c75dea84 1.4s
=> => resolve docker.io/alpine/git:2.36.2@sha256:ec491c893597b68c92b88023827faa771772cfd5e106b76c713fa5e1c75dea84 0.0s
=> => sha256:ec491c893597b68c92b88023827faa771772cfd5e106b76c713fa5e1c75dea84 2.03kB / 2.03kB 0.0s
=> => sha256:a3e645585f160e0589529b8a3ca0fcfdba717ab93507de39ba5a96e207972927 946B / 946B 0.0s
=> => sha256:b80d2cac43e471c2bc5cfe547a45104e69e1b194f6f3f15ba1214f5e3020575e 1.85kB / 1.85kB 0.0s
=> => sha256:213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49 2.81MB / 2.81MB 0.3s
=> => sha256:b3b6ac3db031ea7b3607e700555c68707f072c457cb4e5511c12cf529656d437 18.49MB / 18.49MB 0.3s
=> => sha256:3fd92eeca8f54976c24de929011349e191dc349bf932629be5ac6fdf1d1c25df 99B / 99B 0.1s
=> => extracting sha256:213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49 0.1s
=> => extracting sha256:b3b6ac3db031ea7b3607e700555c68707f072c457cb4e5511c12cf529656d437 0.5s
=> => extracting sha256:3fd92eeca8f54976c24de929011349e191dc349bf932629be5ac6fdf1d1c25df 0.0s
=> [stage-1 1/16] FROM docker.io/library/python:3.10.9-slim@sha256:76dd18d90a3d8710e091734bf2c9dd686d68747a51908db1e1f41e9a5ed4e2c5 3.8s
=> => resolve docker.io/library/python:3.10.9-slim@sha256:76dd18d90a3d8710e091734bf2c9dd686d68747a51908db1e1f41e9a5ed4e2c5 0.0s
=> => sha256:76dd18d90a3d8710e091734bf2c9dd686d68747a51908db1e1f41e9a5ed4e2c5 1.86kB / 1.86kB 0.0s
=> => sha256:e15bb169d3a85f7e9c0f2d105ce628f13d71aed44b5d3d230b88f9653a9b19d5 1.37kB / 1.37kB 0.0s
=> => sha256:343cc23871cfcec31fcf0681d5107e22d4fa214fad76deec63868835ad06849e 7.79kB / 7.79kB 0.0s
=> => sha256:01b5b2efb836d74b8b49da819514eca52e25290d1688db59420ffb9c6b65a03c 31.40MB / 31.40MB 0.7s
=> => sha256:11d639c994a82f2fc3c071bc85b7fa8fb341d4186e1b1c535f8d4147b07f78cd 11.74MB / 11.74MB 0.7s
=> => sha256:5dda314a937ad03f8beac81c714da74e459b6174301368e0903ef586a68ae150 1.08MB / 1.08MB 0.5s
=> => sha256:d1465593fd9b15a8d99135d267721127f140c979a8831c320e1f326b830d2721 233B / 233B 0.6s
=> => sha256:4a6d0cbbdb413b71a251597fa3b79f3c0ec3ed7b7c1ee8ae3d4fe4fe053a04a4 3.35MB / 3.35MB 0.7s
=> => extracting sha256:01b5b2efb836d74b8b49da819514eca52e25290d1688db59420ffb9c6b65a03c 1.6s
=> => extracting sha256:5dda314a937ad03f8beac81c714da74e459b6174301368e0903ef586a68ae150 0.1s
=> => extracting sha256:11d639c994a82f2fc3c071bc85b7fa8fb341d4186e1b1c535f8d4147b07f78cd 0.5s
=> => extracting sha256:d1465593fd9b15a8d99135d267721127f140c979a8831c320e1f326b830d2721 0.0s
=> => extracting sha256:4a6d0cbbdb413b71a251597fa3b79f3c0ec3ed7b7c1ee8ae3d4fe4fe053a04a4 0.3s
=> [download 2/7] COPY builder/clone.sh /clone.sh 0.1s
=> [download 3/7] RUN . /clone.sh taming-transformers https://github.com/CompVis/taming-transformers.git 24268930bf1dce879235a7fddd0b2355b84d7ea6 && rm -rf data assets **/*.ipynb 3.4s
=> [stage-1 2/16] RUN apt-get update && apt install -y fonts-dejavu-core rsync git jq moreutils aria2 wget libgoogle-perftools-dev procps && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* && apt-get clean -y 17.5s
=> [download 4/7] RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git 47b6b607fdd31875c9279cd2f4f16b92e4ea958e && rm -rf assets data/**/*.png data/**/*.jpg data/**/*.gif 2.3s
=> [download 5/7] RUN . /clone.sh CodeFormer https://github.com/sczhou/CodeFormer.git c5b4593074ba6214284d6acd5f1719b6c5d739af && rm -rf assets inputs 1.1s
=> [download 6/7] RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9 && . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git 5b3af030dd83e0297272d861c19477735d031 2.0s
=> [download 7/7] RUN wget -O /model.safetensors https://civitai.com/api/download/models/15236 450.0s
=> [stage-1 3/16] RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 162.6s
=> [stage-1 4/16] RUN --mount=type=cache,target=/root/.cache/pip git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git && cd stable-diffusion-webui && git reset --hard 89f9faa63388756314e8a1d96cf86bf5e0 54.2s
=> [stage-1 5/16] COPY --from=download /repositories/ /stable-diffusion-webui/repositories/ 0.1s
=> [stage-1 6/16] COPY --from=download /model.safetensors /model.safetensors 2.1s
=> [stage-1 7/16] RUN mkdir /stable-diffusion-webui/interrogate && cp /stable-diffusion-webui/repositories/clip-interrogator/data/* /stable-diffusion-webui/interrogate 0.4s
=> [stage-1 8/16] RUN --mount=type=cache,target=/root/.cache/pip pip install -r /stable-diffusion-webui/repositories/CodeFormer/requirements.txt 2.9s
=> [stage-1 9/16] COPY builder/requirements.txt /requirements.txt 0.0s
=> [stage-1 10/16] RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip && pip install --upgrade -r /requirements.txt --no-cache-dir && rm /requirements.txt 21.1s
=> [stage-1 11/16] RUN --mount=type=cache,target=/root/.cache/pip cd stable-diffusion-webui && git fetch && git reset --hard 89f9faa63388756314e8a1d96cf86bf5e0663045 && pip install -r requirements_versions.txt 4.2s
=> [stage-1 12/16] ADD src . 0.0s
=> [stage-1 13/16] COPY builder/cache.py /stable-diffusion-webui/cache.py 0.0s
=> [stage-1 14/16] RUN cd /stable-diffusion-webui && python cache.py --use-cpu=all --ckpt /model.safetensors 38.6s
=> [stage-1 15/16] RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* 0.6s
=> [stage-1 16/16] RUN chmod +x /start.sh 0.5s
=> exporting to image 44.8s
=> => exporting layers 44.8s
=> => writing image sha256:d06aabe7f859ec05fc5509ebf0b981db2ad5ae7342573888731abb6f9d85d105
I'm running into the same problem -- @harrywang would you mind pasting the Dockerfile changes that got it working for you?
I'm running into the same problem -- @harrywang would you mind pasting the Dockerfile changes that got it working for you?
it works on Ubuntu - not working on Mac
Ah, I misunderstood. Got it, thanks
Hey @justinmerrell -- has this issue been fixed or are there no plans to support building on M1s?
Building on M1 works for me with DOCKER_BUILDKIT=1 docker build . --platform=linux/amd64
I'm getting the following error:
=> ERROR [stage-1 3/16] RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl 80.1s
=> [download 6/7] RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9 && . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git 6.2s
=> [download 7/7] ADD ./model.safetensors / 4.8s
------
> [stage-1 3/16] RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118:
2.033 Looking in indexes: https://download.pytorch.org/whl/cu118
2.777 Collecting torch
2.802 Downloading https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-linux_x86_64.whl (2267.3 MB)
63.71 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/2.3 GB 37.2 MB/s eta 0:00:12
76.77 ERROR: Wheel 'torch' located at /tmp/pip-unpack-1qummgca/torch-2.0.1+cu118-cp310-cp310-linux_x86_64.whl is invalid.
78.31 WARNING: There was an error checking the latest version of pip.
------
Dockerfile:44
--------------------
43 |
44 | >>> RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip \
45 | >>> pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
46 |
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118" did not complete successfully: exit code: 1
Any idea?
just clone the repo and run
docker build .
with Mac Docker Desktop.Thanks for the help!