Update JVM dev build Dockerfile and shell script (#6792)
Co-authored-by: Zhuo Yuzhen <yuzhuo@paypal.com>
This commit is contained in:
parent
4d81c741e9
commit
f20ffa8db3
@ -16,21 +16,21 @@
|
|||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
FROM centos:6
|
FROM centos:7
|
||||||
|
|
||||||
# Install all basic requirements
|
# Install all basic requirements
|
||||||
RUN \
|
RUN \
|
||||||
yum -y update && \
|
yum -y update && \
|
||||||
yum install -y tar unzip wget xz git centos-release-scl yum-utils java-1.8.0-openjdk-devel && \
|
yum install -y bzip2 make tar unzip wget xz git centos-release-scl yum-utils java-1.8.0-openjdk-devel && \
|
||||||
yum-config-manager --enable centos-sclo-rh-testing && \
|
yum-config-manager --enable centos-sclo-rh-testing && \
|
||||||
yum -y update && \
|
yum -y update && \
|
||||||
yum install -y devtoolset-6-gcc devtoolset-6-binutils devtoolset-6-gcc-c++ && \
|
yum install -y devtoolset-7-gcc devtoolset-7-binutils devtoolset-7-gcc-c++ && \
|
||||||
# Python
|
# Python
|
||||||
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh && \
|
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh && \
|
||||||
bash Miniconda3-4.5.12-Linux-x86_64.sh -b -p /opt/python && \
|
bash Miniconda3-4.5.12-Linux-x86_64.sh -b -p /opt/python && \
|
||||||
# CMake
|
# CMake
|
||||||
wget -nv -nc https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh --no-check-certificate && \
|
wget -nv -nc https://cmake.org/files/v3.18/cmake-3.18.3-Linux-x86_64.sh --no-check-certificate && \
|
||||||
bash cmake-3.12.0-Linux-x86_64.sh --skip-license --prefix=/usr && \
|
bash cmake-3.18.3-Linux-x86_64.sh --skip-license --prefix=/usr && \
|
||||||
# Maven
|
# Maven
|
||||||
wget https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz && \
|
wget https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz && \
|
||||||
tar xvf apache-maven-3.6.1-bin.tar.gz -C /opt && \
|
tar xvf apache-maven-3.6.1-bin.tar.gz -C /opt && \
|
||||||
@ -38,9 +38,9 @@ RUN \
|
|||||||
|
|
||||||
# Set the required environment variables
|
# Set the required environment variables
|
||||||
ENV PATH=/opt/python/bin:/opt/maven/bin:$PATH
|
ENV PATH=/opt/python/bin:/opt/maven/bin:$PATH
|
||||||
ENV CC=/opt/rh/devtoolset-6/root/usr/bin/gcc
|
ENV CC=/opt/rh/devtoolset-7/root/usr/bin/gcc
|
||||||
ENV CXX=/opt/rh/devtoolset-6/root/usr/bin/c++
|
ENV CXX=/opt/rh/devtoolset-7/root/usr/bin/c++
|
||||||
ENV CPP=/opt/rh/devtoolset-6/root/usr/bin/cpp
|
ENV CPP=/opt/rh/devtoolset-7/root/usr/bin/cpp
|
||||||
ENV JAVA_HOME=/usr/lib/jvm/java
|
ENV JAVA_HOME=/usr/lib/jvm/java
|
||||||
|
|
||||||
# Install Python packages
|
# Install Python packages
|
||||||
|
|||||||
@ -34,9 +34,9 @@ docker build -t dmlc/xgboost4j-build %BASEDIR%
|
|||||||
docker run^
|
docker run^
|
||||||
-it^
|
-it^
|
||||||
--rm^
|
--rm^
|
||||||
--memory 8g^
|
--memory 12g^
|
||||||
--env JAVA_OPTS="-Xmx6g"^
|
--env JAVA_OPTS="-Xmx9g"^
|
||||||
--env MAVEN_OPTS="-Xmx2g"^
|
--env MAVEN_OPTS="-Xmx3g"^
|
||||||
--ulimit core=-1^
|
--ulimit core=-1^
|
||||||
--volume %BASEDIR%\..\..:/xgboost^
|
--volume %BASEDIR%\..\..:/xgboost^
|
||||||
--volume %M2DIR%:/root/.m2^
|
--volume %M2DIR%:/root/.m2^
|
||||||
|
|||||||
@ -24,9 +24,9 @@ docker build -t dmlc/xgboost4j-build "${BASEDIR}" # build and tag the Dockerfile
|
|||||||
docker run \
|
docker run \
|
||||||
-it \
|
-it \
|
||||||
--rm \
|
--rm \
|
||||||
--memory 8g \
|
--memory 12g \
|
||||||
--env JAVA_OPTS="-Xmx6g" \
|
--env JAVA_OPTS="-Xmx9g" \
|
||||||
--env MAVEN_OPTS="-Xmx2g" \
|
--env MAVEN_OPTS="-Xmx3g" \
|
||||||
--ulimit core=-1 \
|
--ulimit core=-1 \
|
||||||
--volume "${BASEDIR}/../..":/xgboost \
|
--volume "${BASEDIR}/../..":/xgboost \
|
||||||
--volume "${BASEDIR}/.m2":/root/.m2 \
|
--volume "${BASEDIR}/.m2":/root/.m2 \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user