From e05129774e76206fe890b511c346953107b05fce Mon Sep 17 00:00:00 2001 From: Nan Zhu Date: Sun, 27 Aug 2017 01:12:23 -0700 Subject: [PATCH] [build] explicitly install JDK8 (#7574) * explicitly install openjdk8 * handle earlier version of ubuntu * install software-properties-common * update -y * update commands --- docker/install/scala.sh | 10 +++++++++- docs/get_started/build_from_source.md | 8 +++++++- tests/ci_build/Dockerfile.ubuntu1404_cuda75_cudnn5 | 8 +++++++- tests/ci_build/install/ubuntu_install_scala.sh | 9 +++++++-- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/docker/install/scala.sh b/docker/install/scala.sh index bb0bb9c900d4..c1d2de6c75b2 100755 --- a/docker/install/scala.sh +++ b/docker/install/scala.sh @@ -19,7 +19,15 @@ # install libraries for mxnet's scala package on ubuntu -apt-get install -y maven default-jdk + +apt-get install -y software-properties-common +add-apt-repository -y ppa:webupd8team/java +apt-get update +echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections +apt-get install -y oracle-java8-installer +apt-get install -y oracle-java8-set-default + +apt-get install -y maven wget http://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.deb dpkg -i scala-2.11.8.deb diff --git a/docs/get_started/build_from_source.md b/docs/get_started/build_from_source.md index 4ff2cc09aa82..9bf397bc9f14 100644 --- a/docs/get_started/build_from_source.md +++ b/docs/get_started/build_from_source.md @@ -367,7 +367,13 @@ Both JDK and Maven are required to build the Scala package.
```bash -sudo apt-get install -y maven default-jdk +apt-get install -y software-properties-common +add-apt-repository -y ppa:webupd8team/java +apt-get update +echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections +apt-get install -y oracle-java8-installer +apt-get install -y oracle-java8-set-default +apt-get install -y maven ```
diff --git a/tests/ci_build/Dockerfile.ubuntu1404_cuda75_cudnn5 b/tests/ci_build/Dockerfile.ubuntu1404_cuda75_cudnn5 index e9810af6b72c..88fd7cea6fcb 100644 --- a/tests/ci_build/Dockerfile.ubuntu1404_cuda75_cudnn5 +++ b/tests/ci_build/Dockerfile.ubuntu1404_cuda75_cudnn5 @@ -23,7 +23,13 @@ RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && cp *.a /usr/lib RUN pip install nose cpplint 'pylint==1.4.4' 'astroid==1.3.6' # MAVEN -RUN apt-get install -y maven default-jdk +RUN apt-get install -y software-properties-common +RUN add-apt-repository ppa:webupd8team/java -y +RUN apt-get update +RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections +RUN apt-get install -y oracle-java8-installer +RUN apt-get install -y oracle-java8-set-default +RUN apt-get install -y maven # R RUN apt-get install -y software-properties-common r-base-core libcurl4-openssl-dev libssl-dev libxml2-dev diff --git a/tests/ci_build/install/ubuntu_install_scala.sh b/tests/ci_build/install/ubuntu_install_scala.sh index 712eff98b02a..169ece036d2f 100755 --- a/tests/ci_build/install/ubuntu_install_scala.sh +++ b/tests/ci_build/install/ubuntu_install_scala.sh @@ -19,5 +19,10 @@ # install libraries for mxnet's scala package on ubuntu -apt-get update && apt-get install -y \ - maven default-jdk +apt-get install -y software-properties-common +add-apt-repository -y ppa:webupd8team/java +apt-get update +echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections +apt-get install -y oracle-java8-installer +apt-get install -y oracle-java8-set-default +apt-get update && apt-get install -y maven