You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by we...@apache.org on 2022/05/19 18:48:10 UTC
[incubator-mxnet] branch v1.9.1-test updated: fix LD path for cuda files
This is an automated email from the ASF dual-hosted git repository.
weichu pushed a commit to branch v1.9.1-test
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/v1.9.1-test by this push:
new 65a01503ad fix LD path for cuda files
65a01503ad is described below
commit 65a01503ad9f29d00c0f0e9d7b4fc64b37b7f4a9
Author: Wei Chu <we...@amazon.com>
AuthorDate: Thu May 19 11:47:33 2022 -0700
fix LD path for cuda files
---
cd/python/docker/Dockerfile | 7 ++++---
cd/python/docker/python_images.sh | 9 ++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/cd/python/docker/Dockerfile b/cd/python/docker/Dockerfile
index e6ba466923..ac9f493400 100644
--- a/cd/python/docker/Dockerfile
+++ b/cd/python/docker/Dockerfile
@@ -23,10 +23,11 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
+ARG CUDA_VERSION
+
# manually update cuda repo key: https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
# remove this after nvidia updates the base images with new keys
-ARG IS_CUDA
-RUN if [ "$IS_CUDA" = "true" ] ; then \
+RUN if [ "$CUDA_VERSION" != "false" ] ; then \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub; \
fi
@@ -48,7 +49,7 @@ RUN if [ "$MXNET_VARIANT" = "aarch64_cpu" ] ; then \
tar -xvf arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2.tar && \
arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2/arm-performance-libraries_21.0_Ubuntu-18.04.sh -a; \
fi
-ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/arm/armpl_21.0_gcc-8.2/lib
+ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/arm/armpl_21.0_gcc-8.2/lib:/usr/local/cuda-${CUDA_VERSION}/compat
ARG MXNET_COMMIT_ID
ENV MXNET_COMMIT_ID=${MXNET_COMMIT_ID}
diff --git a/cd/python/docker/python_images.sh b/cd/python/docker/python_images.sh
index bd0a5b5519..e82f642394 100755
--- a/cd/python/docker/python_images.sh
+++ b/cd/python/docker/python_images.sh
@@ -44,16 +44,15 @@ if [ ! -z "${RELEASE_PUBLIC_ECR_REPOSITORY}" ]; then
fi
build() {
- # use this flag to manually update cuda repo key: https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
- # remove it after nvidia updates the base images with new keys
+ # use this flag to set LD_LIBRARY_PATH for cuda files
if [[ $mxnet_variant = cu* ]]; then
- is_cuda="true"
+ cuda_version=${mxnet_variant:2:-1}.${mxnet_variant: -1}
else
- is_cuda="false"
+ cuda_version="false"
fi
# NOTE: Ensure the correct context root is passed in when building - Dockerfile expects ./wheel_build
- docker build -t "${image_name}" --build-arg BASE_IMAGE="${base_image}" --build-arg MXNET_COMMIT_ID=${GIT_COMMIT} --build-arg MXNET_VARIANT=${mxnet_variant} --build-arg IS_CUDA=${is_cuda} -f ${resources_path}/Dockerfile ./wheel_build
+ docker build -t "${image_name}" --build-arg BASE_IMAGE="${base_image}" --build-arg MXNET_COMMIT_ID=${GIT_COMMIT} --build-arg MXNET_VARIANT=${mxnet_variant} --build-arg CUDA_VERSION=${cuda_version} -f ${resources_path}/Dockerfile ./wheel_build
}
test() {