Skip to content

Commit

Permalink
Update the IT Dockerfile to reduce the image size (NVIDIA#766)
Browse files Browse the repository at this point in the history
- Assembled all the installations in one RUN
- Cleaned the conda cache files after all the installations done
- Removed the duplicate python3.6

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
  • Loading branch information
firestarman authored Sep 15, 2020
1 parent db27621 commit f26ffba
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions jenkins/Dockerfile.integration.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ FROM nvidia/cuda:${CUDA_VER}-runtime-centos7
#Install java-8, maven, docker image
RUN yum update -y && \
yum install -y centos-release-scl && \
yum install -y java-1.8.0-openjdk-devel \
wget rh-python36

yum install -y java-1.8.0-openjdk-devel wget

# The default mvn verision is 3.05 on centos7 docker container.
# The plugin: net.alchim31.maven requires a higher mvn version.
Expand All @@ -38,27 +36,24 @@ RUN wget ${URM_URL}/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.t
tar xzvf $MAVEN_HOME-bin.tar.gz -C /usr/local && \
rm -f $MAVEN_HOME-bin.tar.gz

ENV PATH "$MAVEN_HOME/bin:/opt/rh/rh-python36/root/usr/bin/:$PATH"
ENV PATH "$MAVEN_HOME/bin:$PATH"

RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda

RUN . /opt/conda/bin/activate && \
conda init

ENV PATH="/opt/conda/bin:${PATH}"

RUN conda --version
RUN . /opt/conda/bin/activate && \
conda init && \
conda --version

ARG CUDA_TOOLKIT_VER=10.1
RUN conda install -c rapidsai -c nvidia -c conda-forge \
-c defaults cudf=0.15 python=3.7 cudatoolkit=${CUDA_TOOLKIT_VER}

RUN conda install spacy && \
python -m spacy download en_core_web_sm

RUN conda install -c anaconda pytest requests pandas pyarrow
RUN conda install -c conda-forge sre_yield
RUN conda install -y -c rapidsai -c nvidia -c conda-forge -c defaults cudf=0.15 python=3.7 cudatoolkit=${CUDA_TOOLKIT_VER} && \
conda install -y spacy && \
python -m spacy download en_core_web_sm && \
conda install -y -c anaconda pytest requests pandas pyarrow && \
conda install -y -c conda-forge sre_yield && \
conda clean -ay

# Set ENV for mvn
ENV JAVA_HOME "/usr/lib/jvm/java-1.8.0-openjdk"
Expand Down

0 comments on commit f26ffba

Please sign in to comment.