File tree 4 files changed +16
-1
lines changed
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
25
25
ARG CUDA_MINOR_VERSION
26
26
ENV CUDA_MAJOR_VERSION=${CUDA_MAJOR_VERSION}
27
27
ENV 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
28
30
# NVIDIA binaries from the host are mounted to /opt/bin.
29
31
ENV PATH=/opt/bin:${PATH}
30
32
# 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 {
52
52
set -exo pipefail
53
53
source config.txt
54
54
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
56
61
'''
57
62
}
58
63
}
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ ARG BASE_IMAGE
3
3
FROM ${BASE_IMAGE} AS builder
4
4
5
5
ARG 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
6
11
7
12
# Build instructions: https://lightgbm.readthedocs.io/en/latest/GPU-Tutorial.html#build-lightgbm
8
13
RUN apt-get update && \
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ ARG TORCHVISION_VERSION
9
9
ARG CUDA_MAJOR_VERSION
10
10
ARG CUDA_MINOR_VERSION
11
11
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
+
12
15
# TORCHVISION_VERSION is mandatory
13
16
RUN test -n "$TORCHVISION_VERSION"
14
17
You can’t perform that action at this time.
0 commit comments