Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# syntax=docker/dockerfile:1
FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-devel AS builder
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime AS builder
WORKDIR /
ENV FORCE_CUDA=1 MAX_JOBS=3 TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0 8.6" python_abi=cp37-cp37m
ENV FORCE_CUDA=1 MAX_JOBS=3 TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0 8.6" python_abi=cp310-cp310m
RUN apt-get update && apt-get install -y git
RUN pip3 wheel -v git+https://github.com/facebookresearch/xformers
RUN pip3 wheel bitsandbytes

FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-devel
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
WORKDIR /
RUN --mount=type=bind,target=whls,from=builder apt-get update && apt-get install -y git wget && \
git clone https://github.com/ShivamShrirao/diffusers && \
cd diffusers/examples/dreambooth/ && \
git checkout 4affee && \
pip install --no-cache-dir /diffusers triton==2.0.0.dev20220701 /whls/xformers*.whl /whls/bitsandbytes*.whl scipy pytorch-lightning && \
git checkout fbdf0a17055ffa34679cb34d986fabc1296d0785 && \
pip install --no-cache-dir /diffusers triton==2.0.0 scipy pytorch-lightning bitsandbytes-cuda116 && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir -I markupsafe==2.0.1 OmegaConf && \
cp train_dreambooth.py / && \
Expand Down
6 changes: 6 additions & 0 deletions note.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### build docker image

```
DOCKER_BUILDKIT=1 docker build . -t dreambooth:v1
```