File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed
Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ ARG CUDA_MAJOR_VERSION
2525ARG CUDA_MINOR_VERSION
2626ENV CUDA_MAJOR_VERSION=${CUDA_MAJOR_VERSION}
2727ENV CUDA_MINOR_VERSION=${CUDA_MINOR_VERSION}
28+ # Make sure we are on the right version of CUDA
29+ RUN update-alternatives --set cuda /usr/local/cuda-$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION
2830# NVIDIA binaries from the host are mounted to /opt/bin.
2931ENV PATH=/opt/bin:${PATH}
3032# Add CUDA stubs to LD_LIBRARY_PATH to support building the GPU image on a CPU machine.
Original file line number Diff line number Diff line change @@ -52,7 +52,12 @@ pipeline {
5252 set -exo pipefail
5353 source config.txt
5454 cd packages/
55- ./build_package --base-image $BASE_IMAGE_REPO/$GPU_BASE_IMAGE_NAME:$BASE_IMAGE_TAG --package lightgbm --version $LIGHTGBM_VERSION --push
55+ ./build_package --base-image $BASE_IMAGE_REPO/$GPU_BASE_IMAGE_NAME:$BASE_IMAGE_TAG \
56+ --package lightgbm \
57+ --version $LIGHTGBM_VERSION \
58+ --build-arg CUDA_MAJOR_VERSION=$CUDA_MAJOR_VERSION \
59+ --build-arg CUDA_MINOR_VERSION=$CUDA_MINOR_VERSION \
60+ --push
5661 '''
5762 }
5863 }
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ ARG BASE_IMAGE
33FROM ${BASE_IMAGE} AS builder
44
55ARG PACKAGE_VERSION
6+ ARG CUDA_MAJOR_VERSION
7+ ARG CUDA_MINOR_VERSION
8+
9+ # Make sure we are on the right version of CUDA
10+ RUN update-alternatives --set cuda /usr/local/cuda-$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION
611
712# Build instructions: https://lightgbm.readthedocs.io/en/latest/GPU-Tutorial.html#build-lightgbm
813RUN apt-get update && \
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ ARG TORCHVISION_VERSION
99ARG CUDA_MAJOR_VERSION
1010ARG CUDA_MINOR_VERSION
1111
12+ # Make sure we are on the right version of CUDA
13+ RUN update-alternatives --set cuda /usr/local/cuda-$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION
14+
1215# TORCHVISION_VERSION is mandatory
1316RUN test -n "$TORCHVISION_VERSION"
1417
You can’t perform that action at this time.
0 commit comments