Skip to content

Commit 02b637c

Browse files
tjohnson31415njhill
authored andcommitted
build: set TORCH_CUDA_ARCH_LIST in one place
Signed-off-by: Travis Johnson <[email protected]>
1 parent b978ff1 commit 02b637c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ ARG PYTORCH_VERSION
183183
ARG PYTHON_VERSION
184184
ARG MINIFORGE_VERSION=23.3.1-1
185185

186+
# consistent arch support anywhere we compile CUDA code
187+
ENV TORCH_CUDA_ARCH_LIST="8.0;8.6+PTX;8.9"
188+
186189
RUN dnf install -y unzip git ninja-build && dnf clean all
187190

188191
RUN curl -fsSL -v -o ~/miniforge3.sh -O "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-$(uname)-$(uname -m).sh" && \
@@ -231,15 +234,15 @@ FROM python-builder as exllama-kernels-builder
231234
WORKDIR /usr/src
232235

233236
COPY server/exllama_kernels/ .
234-
RUN TORCH_CUDA_ARCH_LIST="8.0;8.6+PTX;8.9" python setup.py build
237+
RUN python setup.py build
235238

236239
## Build transformers exllamav2 kernels ########################################
237240
FROM python-builder as exllamav2-kernels-builder
238241

239242
WORKDIR /usr/src
240243

241244
COPY server/exllamav2_kernels/ .
242-
RUN TORCH_CUDA_ARCH_LIST="8.0;8.6+PTX;8.9" python setup.py build
245+
RUN python setup.py build
243246

244247
## Flash attention cached build image ##########################################
245248
FROM base as flash-att-cache

0 commit comments

Comments
 (0)