Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/v1.x' into lts_fixes_v1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Evans committed Jul 23, 2020
2 parents a392b12 + b81c1ce commit 7e143a2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
43 changes: 30 additions & 13 deletions ci/docker/Dockerfile.build.jetson
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# This script assumes /work/mxnet exists and contains the mxnet code you wish to compile and
# that /work/build exists and is the target for your output.

FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04

ENV ARCH=aarch64 \
HOSTCC=gcc \
Expand All @@ -32,7 +32,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
ninja-build \
git \
curl \
wget \
zip \
unzip \
python3 \
Expand All @@ -58,21 +58,38 @@ RUN git clone --recursive -b v0.3.9 https://github.com/xianyi/OpenBLAS.git && \
cd /usr/local && \
rm -rf OpenBLAS

# Install aarch64 cross depedencies based on Jetpack 4.3
# Manually downloaded using SDK Manager tool and placed in a private S3 bucket.
# We're not allowed to redistribute these files and there is no public version.
RUN aws s3 cp s3://mxnet-ci-prod-private-slave-data/nvidia/sdkm_downloads/cuda-repo-ubuntu1804-10-0-local-10.0.326-410.108_1.0-1_amd64.deb . && \
dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.326-410.108_1.0-1_amd64.deb && \
rm cuda-repo-ubuntu1804-10-0-local-10.0.326-410.108_1.0-1_amd64.deb && \
apt-key add /var/cuda-repo-10-0-local-10.0.326-410.108/7fa2af80.pub && \
aws s3 cp s3://mxnet-ci-prod-private-slave-data/nvidia/sdkm_downloads/cuda-repo-cross-aarch64-10-0-local-10.0.326_1.0-1_all.deb . && \
dpkg -i cuda-repo-cross-aarch64-10-0-local-10.0.326_1.0-1_all.deb && \
rm cuda-repo-cross-aarch64-10-0-local-10.0.326_1.0-1_all.deb && \
# Install aarch64 cross depedencies based on Jetpack 4.4
# Dependencies require cuda-toolkit-10.2 which isn't installed in nvidia docker container
# It contains cuda-compat instead. However deb files currently depend on cuda-toolkit alone.
# Hence force dpkg configure
RUN wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cudart-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cufft-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cupti-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-curand-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cusolver-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cusparse-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-driver-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-misc-headers-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-npp-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-nsight-compute-addon-l4t-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-nvgraph-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-nvml-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-nvrtc-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cublas/libcublas-cross-aarch64_10.2.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/n/nsight-compute/nsight-compute-addon-l4t-2019.5.0_2019.5.0.14-1_all.deb && \
dpkg -i --force-all *.deb && \
rm *.deb && \
apt-get update && \
apt-get install -y -f && \
apt-get install -y cuda-cross-aarch64 cuda-cross-aarch64-10-0 && \
apt-get install -y cuda-cross-aarch64 cuda-cross-aarch64-10-2 && \
rm -rf /var/lib/apt/lists/*

# nvidia jetpack 4.4 installs libcublas.so at /usr/lib/aarch64-linux-gnu
# while previously it used to store it at /usr/local/cuda/targets/aarch64-linux/lib/stubs
RUN ln -s /usr/lib/aarch64-linux-gnu/libcublas.so /usr/local/cuda/targets/aarch64-linux/lib/stubs/libcublas.so

ARG USER_ID=0
ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
Expand Down
1 change: 1 addition & 0 deletions ci/docker/toolchains/aarch64-linux-gnu-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR "aarch64")
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
set(CMAKE_CUDA_COMPILER nvcc)
set(CMAKE_CUDA_HOST_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_FIND_ROOT_PATH "/usr/aarch64-linux-gnu")

Expand Down

0 comments on commit 7e143a2

Please sign in to comment.