Skip to content

Commit

Permalink
'nightly' add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Sep 11, 2024
1 parent 6418769 commit d00790b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
33 changes: 33 additions & 0 deletions nightly/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \
--pre torch torchvision torchaudio \
--index-url https://download.pytorch.org/whl/nightly/cu124

################################################################################
# Dependencies

# RUN --mount=type=cache,target=/root/.cache/pip \
# pip install \
# accelerate \
Expand Down Expand Up @@ -130,6 +132,37 @@ RUN --mount=type=cache,target=/root/.cache/pip \
# mediapipe \
# && pip list

################################################################################
# # Build xFormers

# # https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
# ARG TORCH_CUDA_ARCH_LIST="5.2+PTX;6.0;6.1+PTX;7.0+PTX;7.5;8.0;8.6+PTX;8.9+PTX"

# # Limit max concurrent build jobs. Not set here.
# ARG MAX_JOBS

# RUN mkdir -p /BUILD/wheels

# RUN --mount=type=cache,target=/root/.cache/pip \
# pip install \
# -r https://raw.githubusercontent.com/facebookresearch/xformers/main/requirements.txt

# RUN git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \
# https://github.com/facebookresearch/xformers.git \
# /BUILD/xformers

# WORKDIR /BUILD/xformers

# RUN --mount=type=cache,target=/root/.cache/pip \
# --mount=type=cache,target=/BUILD/xformers/build \
# --mount=type=cache,target=/BUILD/xformers/dist \
# python3 setup.py bdist_wheel -d /BUILD/wheels

# RUN --mount=type=cache,target=/root/.cache/pip \
# pip install /BUILD/wheels/*.whl

################################################################################

RUN du -ah /root \
&& find /root/ -mindepth 1 -delete \
&& df -h
Expand Down
10 changes: 8 additions & 2 deletions nightly/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=nightly[View on <Docker Hu

* This image won't download ComfyUI or any models. Please prepare your ComfyUI suite before running the container.
* `xFormers` is not installed in this image.
It requires building from source in order to use it with PyTorch nightly. And building xFormers (with comprehensive build targets) on GitHub Actions (unpaid version) would often result in halt. So for now it's not included.
* Part of the `Dockerfile` is commented out due to CI limitation:
** Only basic dependencies for running ComfyUI is installed. Otherwise the image would be too big that GitHub Actions would throw IOException.

** `xFormers` is not installed in this image.
It requires building from source in order to use it with PyTorch nightly. And building xFormers (with comprehensive build targets) on GitHub Actions would often result in halt (maybe just unpaid version).

** If you build the image by yourself, you can uncomment the lines in `Dockerfile`, for a bigger, yet more comprehensive image.

## Running

Expand Down

0 comments on commit d00790b

Please sign in to comment.