Skip to content

Commit

Permalink
I. SAID. FIX. XFORMERS. BUILD.
Browse files Browse the repository at this point in the history
  • Loading branch information
neggles committed Sep 17, 2023
1 parent 1d67af0 commit cdacfd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker-bake.xformers.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ variable "TORCH_CUDA_ARCH_LIST" {
}

variable "MAX_JOBS" {
default = ""
default = "32"
}

function "imagetag" {
Expand Down
7 changes: 3 additions & 4 deletions docker/xformers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ARG PIP_PREFER_BINARY

# build options
ARG TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6;8.9;9.0"
ARG MAX_JOBS
ARG MAX_JOBS=32

# make pip STFU about being root
ENV PIP_ROOT_USER_ACTION=ignore
Expand Down Expand Up @@ -58,11 +58,10 @@ RUN export BUILD_VERSION=$(python3 packaging/compute_wheel_version.py)
ENV BUILD_VERSION=${BUILD_VERSION}

# build xformers and output to /xformers for later extraction
ARG MAX_JOBS=64
ENV MAX_JOBS=${MAX_JOBS}
RUN rm -fr /xformers \
&& mkdir -p /xformers \
&& export MAX_JOBS=${MAX_JOBS} \
&& nice -n20 python3 setup.py bdist_wheel \
&& nice -n20 MAX_JOBS=${MAX_JOBS} python3 setup.py bdist_wheel \
-d /xformers \
-k

Expand Down

0 comments on commit cdacfd1

Please sign in to comment.