DLRS release 1260 - Update Dockerfiles

Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
This commit is contained in:
Daniela Plascencia
2019-03-22 10:44:56 -06:00
committed by sys-jenkinsotcswstac
parent 9f6b33dfc8
commit 568d712d0f
3 changed files with 41 additions and 11 deletions
+30 -7
View File
@@ -1,13 +1,36 @@
FROM clearlinux
LABEL maintainer="otc-swstacks@intel.com"
MAINTAINER otc-swstacks@intel.com
ARG swupd_args
COPY setup_mkl.sh /
RUN swupd update $swupd_args && \
swupd bundle-add curl git && \
/setup_mkl.sh && \
rm setup_mkl.sh
swupd bundle-add devpkg-openmpi git sysadmin-basic
CMD 'bash'
# install miniconda
ADD https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh /miniconda.sh
RUN sh /miniconda.sh -b -p /opt/conda && \
/opt/conda/bin/conda update -n base conda && \
rm /miniconda.sh
ENV PATH=${PATH}:/opt/conda/bin
# create tf_env and install tensorflow with mkl-dnn
SHELL ["/bin/bash", "-c"]
RUN conda create -n tf_env
RUN conda install -n tf_env -y -c anaconda \
pip tensorflow nltk ipython
# add conda env script to bashrc
RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate tf_env" >> ~/.bashrc
# install horovod
RUN source ~/.bashrc
RUN mv /opt/conda/envs/tf_env/compiler_compat/ld /opt/conda/envs/tf_env/compiler_compat/ld.orig
RUN HOROVOD_WITH_TENSORFLOW=1 /opt/conda/envs/tf_env/bin/pip install --no-cache-dir horovod
RUN mv /opt/conda/envs/tf_env/compiler_compat/ld.orig /opt/conda/envs/tf_env/compiler_compat/ld
# install additional python packages for ipython and jupyter
RUN /opt/conda/envs/tf_env/bin/pip install --no-cache-dir ipython ipykernel matplotlib jupyter && \
/opt/conda/envs/tf_env/bin/python -m ipykernel.kernelspec
CMD ["/bin/bash"]
+7 -2
View File
@@ -1,9 +1,14 @@
FROM clearlinux
LABEL maintainer="otc-swstacks@intel.com"
MAINTAINER otc-swstacks@intel.com
ARG swupd_args
RUN swupd update $swupd_args && \
swupd bundle-add curl git machine-learning-tensorflow
swupd bundle-add curl sysadmin-basic \
git machine-learning-tensorflow
# install additional python packages for ipython and jupyter notebook
RUN pip --no-cache-dir install ipython ipykernel matplotlib jupyter && \
python -m ipykernel.kernelspec
CMD 'bash'
+4 -2
View File
@@ -4,6 +4,8 @@ LABEL maintainer=otc-swstacks@intel.com
ARG PYTHON_VERSION=3.7.1
ARG MINICONDA_VERSION=4.5.12
ARG HOROVOD_VERSION=0.16.0
ARG MKL_VERSION=2019.1
ARG swupd_args
ENV PATH /opt/conda/bin:$PATH
@@ -16,7 +18,7 @@ ADD https://repo.continuum.io/miniconda/Miniconda3-$MINICONDA_VERSION-Linux-x86_
RUN chmod +x /tmp/miniconda.sh && \
/tmp/miniconda.sh -b -p /opt/conda && \
conda install -y python=$PYTHON_VERSION \
numpy pyyaml scipy ipython mkl mkl-include cython typing && \
numpy pyyaml scipy ipython mkl=${MKL_VERSION} mkl-include=${MKL_VERSION} cython typing && \
conda install -y gcc libgcc -c conda-forge
RUN pip --no-cache-dir install ninja
@@ -36,7 +38,7 @@ RUN CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \
RUN pip --no-cache-dir install torchvision
RUN pip --no-cache-dir install ipython ipykernel jupyter && \
python -m ipykernel.kernelspec
RUN HOROVOD_WITH_TORCH=1 pip install --no-cache-dir horovod
RUN HOROVOD_WITH_TORCH=1 pip install --no-cache-dir horovod==${HOROVOD_VERSION}
RUN mv /opt/conda/compiler_compat/ld.orig /opt/conda/compiler_compat/ld