Skip to content

Commit

Permalink
ngc-xformers: resolve skill issue
Browse files Browse the repository at this point in the history
  • Loading branch information
neggles committed Sep 24, 2023
1 parent a833dc6 commit e1f0a3c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docker/xformers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ 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=8
ARG XFORMERS_BUILD_TYPE=relwithdebinfo
ARG MAX_JOBS=1
ARG XFORMERS_BUILD_TYPE=Release
ARG NVCC_THREADS=1

# make pip STFU about being root
ENV PIP_ROOT_USER_ACTION=ignore
Expand Down Expand Up @@ -63,9 +64,12 @@ ENV BUILD_VERSION=${BUILD_VERSION}

# build xformers and output to /xformers for later extraction
ENV MAX_JOBS=${MAX_JOBS}
ENV NVCC_THREADS=${NVCC_THREADS}
ENV XFORMERS_BUILD_TYPE=${XFORMERS_BUILD_TYPE}
RUN rm -fr /xformers \
&& mkdir -p /xformers \
&& nice -n20 python -m build -n -w -o /xformers .
&& nice -n20 python setup.py bdist_wheel -d /xformers


# Build the final image (empty save for xformers wheel)
FROM scratch AS xformers
Expand Down

0 comments on commit e1f0a3c

Please sign in to comment.