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/17 02:11:02 UTC
[incubator-mxnet] branch v1.9.1-test updated: pass arg to dockerfile
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 bd5b0236a5 pass arg to dockerfile
bd5b0236a5 is described below
commit bd5b0236a5d7ddf94c184465776b878b66b3f76f
Author: Wei Chu <we...@amazon.com>
AuthorDate: Mon May 16 19:10:39 2022 -0700
pass arg to dockerfile
---
cd/python/docker/Dockerfile | 9 +++++----
cd/python/docker/python_images.sh | 10 +++++++++-
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/cd/python/docker/Dockerfile b/cd/python/docker/Dockerfile
index 7314f795dc..e6ba466923 100644
--- a/cd/python/docker/Dockerfile
+++ b/cd/python/docker/Dockerfile
@@ -23,10 +23,10 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
-ARG MXNET_VARIANT
-
-# update cuda repo key: https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
-RUN if [[ $MXNET_VARIANT = cu* ]] ; then \
+# 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 \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub; \
fi
@@ -41,6 +41,7 @@ RUN apt-get update && \
RUN apt-get install -y libgomp1
+ARG MXNET_VARIANT
RUN if [ "$MXNET_VARIANT" = "aarch64_cpu" ] ; then echo "not installing libquadmath0 on aarch64" ; else apt-get install -y libquadmath0 ; fi
RUN if [ "$MXNET_VARIANT" = "aarch64_cpu" ] ; then \
wget https://armkeil.blob.core.windows.net/developer/Files/downloads/hpc/arm-performance-libraries/21-0-0/Ubuntu18.04/arm-performance-libraries_21.0_Ubuntu-18.04_gcc-8.2.tar && \
diff --git a/cd/python/docker/python_images.sh b/cd/python/docker/python_images.sh
index 41bf0d2120..bd0a5b5519 100755
--- a/cd/python/docker/python_images.sh
+++ b/cd/python/docker/python_images.sh
@@ -44,8 +44,16 @@ 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
+ if [[ $mxnet_variant = cu* ]]; then
+ is_cuda="true"
+ else
+ is_cuda="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} -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 IS_CUDA=${is_cuda} -f ${resources_path}/Dockerfile ./wheel_build
}
test() {