From 5046aeb1a4fc260604acdbfecd6d03e0f71f395e Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Wed, 15 May 2019 15:29:32 -0700 Subject: [PATCH] Improve order of execution of install scripts. (#14867) * Improve order of execution of install scripts. Remove uneccesary environment variable. /usr/loca/lib already in ld.so.conf* * Fix --- ci/docker/Dockerfile.build.ubuntu_base_cpu | 1 + ci/docker/Dockerfile.build.ubuntu_base_gpu | 3 +-- ci/docker/Dockerfile.build.ubuntu_build_cuda | 1 - ci/docker/Dockerfile.build.ubuntu_cpu | 2 +- ci/docker/Dockerfile.build.ubuntu_gpu_cu100 | 9 +++++---- ci/docker/Dockerfile.build.ubuntu_gpu_cu90 | 9 +++++---- ci/docker/Dockerfile.build.ubuntu_gpu_cu92 | 8 ++++---- ci/docker/Dockerfile.build.ubuntu_nightly_gpu | 1 - 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ci/docker/Dockerfile.build.ubuntu_base_cpu b/ci/docker/Dockerfile.build.ubuntu_base_cpu index c3ad2e90fb8d..a75ed0255d82 100644 --- a/ci/docker/Dockerfile.build.ubuntu_base_cpu +++ b/ci/docker/Dockerfile.build.ubuntu_base_cpu @@ -25,6 +25,7 @@ WORKDIR /work/deps RUN apt-get update && apt-get -y install sudo +# Always last ARG USER_ID=0 ARG GROUP_ID=0 COPY install/ubuntu_adduser.sh /work/ diff --git a/ci/docker/Dockerfile.build.ubuntu_base_gpu b/ci/docker/Dockerfile.build.ubuntu_base_gpu index 94e49b6fb297..476d882c6d76 100644 --- a/ci/docker/Dockerfile.build.ubuntu_base_gpu +++ b/ci/docker/Dockerfile.build.ubuntu_base_gpu @@ -21,12 +21,11 @@ FROM nvidia/cuda:10.0-devel-ubuntu16.04 -ENV CUDNN_VERSION=7.3.1.20 - WORKDIR /work/deps RUN apt-get update && apt-get -y install sudo +ENV CUDNN_VERSION=7.3.1.20 COPY install/ubuntu_cudnn.sh /work/ RUN /work/ubuntu_cudnn.sh diff --git a/ci/docker/Dockerfile.build.ubuntu_build_cuda b/ci/docker/Dockerfile.build.ubuntu_build_cuda index 08c67cd660f8..11fb5c0d1a62 100644 --- a/ci/docker/Dockerfile.build.ubuntu_build_cuda +++ b/ci/docker/Dockerfile.build.ubuntu_build_cuda @@ -62,4 +62,3 @@ RUN /work/ubuntu_adduser.sh COPY runtime_functions.sh /work/ WORKDIR /work/mxnet -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib diff --git a/ci/docker/Dockerfile.build.ubuntu_cpu b/ci/docker/Dockerfile.build.ubuntu_cpu index 2df9f5887f54..35dcf3ed7410 100644 --- a/ci/docker/Dockerfile.build.ubuntu_cpu +++ b/ci/docker/Dockerfile.build.ubuntu_cpu @@ -70,6 +70,7 @@ COPY install/ubuntu_docs.sh /work/ COPY install/docs_requirements /work/ RUN /work/ubuntu_docs.sh +# Always last ARG USER_ID=0 ARG GROUP_ID=0 COPY install/ubuntu_adduser.sh /work/ @@ -78,4 +79,3 @@ RUN /work/ubuntu_adduser.sh COPY runtime_functions.sh /work/ WORKDIR /work/mxnet -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu_cu100 b/ci/docker/Dockerfile.build.ubuntu_gpu_cu100 index 6ec4a1fe415f..edf0264b967e 100644 --- a/ci/docker/Dockerfile.build.ubuntu_gpu_cu100 +++ b/ci/docker/Dockerfile.build.ubuntu_gpu_cu100 @@ -67,16 +67,17 @@ RUN /work/ubuntu_docs.sh COPY install/ubuntu_tutorials.sh /work/ RUN /work/ubuntu_tutorials.sh +ENV CUDNN_VERSION=7.3.1.20 +COPY install/ubuntu_cudnn.sh /work/ +RUN /work/ubuntu_cudnn.sh + +# Always last ARG USER_ID=0 ARG GROUP_ID=0 COPY install/ubuntu_adduser.sh /work/ RUN /work/ubuntu_adduser.sh -ENV CUDNN_VERSION=7.3.1.20 -COPY install/ubuntu_cudnn.sh /work/ -RUN /work/ubuntu_cudnn.sh COPY runtime_functions.sh /work/ WORKDIR /work/mxnet -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu_cu90 b/ci/docker/Dockerfile.build.ubuntu_gpu_cu90 index 2730cc2caee1..2fb29774b0cf 100644 --- a/ci/docker/Dockerfile.build.ubuntu_gpu_cu90 +++ b/ci/docker/Dockerfile.build.ubuntu_gpu_cu90 @@ -67,15 +67,16 @@ RUN /work/ubuntu_docs.sh COPY install/ubuntu_tutorials.sh /work/ RUN /work/ubuntu_tutorials.sh +ENV CUDNN_VERSION=7.3.1.20 +COPY install/ubuntu_cudnn.sh /work/ +RUN /work/ubuntu_cudnn.sh + +# Always last ARG USER_ID=0 ARG GROUP_ID=0 COPY install/ubuntu_adduser.sh /work/ RUN /work/ubuntu_adduser.sh -ENV CUDNN_VERSION=7.3.1.20 -COPY install/ubuntu_cudnn.sh /work/ -RUN /work/ubuntu_cudnn.sh - COPY runtime_functions.sh /work/ WORKDIR /work/mxnet diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu_cu92 b/ci/docker/Dockerfile.build.ubuntu_gpu_cu92 index 316c81d8a6e1..c297bf0b8a42 100644 --- a/ci/docker/Dockerfile.build.ubuntu_gpu_cu92 +++ b/ci/docker/Dockerfile.build.ubuntu_gpu_cu92 @@ -67,15 +67,15 @@ RUN /work/ubuntu_docs.sh COPY install/ubuntu_tutorials.sh /work/ RUN /work/ubuntu_tutorials.sh +ENV CUDNN_VERSION=7.3.1.20 +COPY install/ubuntu_cudnn.sh /work/ +RUN /work/ubuntu_cudnn.sh + ARG USER_ID=0 ARG GROUP_ID=0 COPY install/ubuntu_adduser.sh /work/ RUN /work/ubuntu_adduser.sh -ENV CUDNN_VERSION=7.3.1.20 -COPY install/ubuntu_cudnn.sh /work/ -RUN /work/ubuntu_cudnn.sh - COPY runtime_functions.sh /work/ WORKDIR /work/mxnet diff --git a/ci/docker/Dockerfile.build.ubuntu_nightly_gpu b/ci/docker/Dockerfile.build.ubuntu_nightly_gpu index 934aded5101d..cadb1dbaf771 100644 --- a/ci/docker/Dockerfile.build.ubuntu_nightly_gpu +++ b/ci/docker/Dockerfile.build.ubuntu_nightly_gpu @@ -83,4 +83,3 @@ RUN /work/ubuntu_adduser.sh COPY runtime_functions.sh /work/ WORKDIR /work/mxnet -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib