From 0df5c7820e4592d14d09eee7e2d91f0c67d45a85 Mon Sep 17 00:00:00 2001 From: wuweikang Date: Fri, 11 Dec 2020 10:42:07 +0800 Subject: [PATCH] add libnuma-dev in dockerfile --- docker/mindspore-cpu/1.1.0/Dockerfile | 71 +++++++++++++++++++++ docker/mindspore-cpu/devel/Dockerfile | 4 ++ docker/mindspore-cpu/runtime/Dockerfile | 4 ++ docker/mindspore-gpu/1.1.0/Dockerfile | 85 +++++++++++++++++++++++++ docker/mindspore-gpu/devel/Dockerfile | 4 ++ docker/mindspore-gpu/runtime/Dockerfile | 4 ++ 6 files changed, 172 insertions(+) create mode 100644 docker/mindspore-cpu/1.1.0/Dockerfile create mode 100644 docker/mindspore-gpu/1.1.0/Dockerfile diff --git a/docker/mindspore-cpu/1.1.0/Dockerfile b/docker/mindspore-cpu/1.1.0/Dockerfile new file mode 100644 index 00000000000..f412c89996d --- /dev/null +++ b/docker/mindspore-cpu/1.1.0/Dockerfile @@ -0,0 +1,71 @@ +FROM ubuntu:18.04 + +MAINTAINER leonwanghui + +# Set env +ENV PYTHON_ROOT_PATH /usr/local/python-3.7.5 +ENV PATH /usr/local/bin:/root/.local/bin:$PATH + +# Install base tools +RUN apt update \ + && DEBIAN_FRONTEND=noninteractive apt install -y \ + vim \ + wget \ + curl \ + xz-utils \ + net-tools \ + openssh-client \ + git \ + ntpdate \ + tzdata \ + tcl \ + sudo \ + bash-completion + +# Install compile tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + gcc \ + g++ \ + zlibc \ + make \ + libgmp-dev \ + patch \ + autoconf \ + libtool \ + automake \ + flex + +# Install the rest dependent tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + libnuma-dev + +# Set bash +RUN echo "dash dash/sh boolean false" | debconf-set-selections +RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash + +# Install python (v3.7.5) +RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \ + libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \ + && cd /tmp \ + && wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \ + && tar -xvf v3.7.5.tar.gz \ + && cd /tmp/cpython-3.7.5 \ + && mkdir -p ${PYTHON_ROOT_PATH} \ + && ./configure --prefix=${PYTHON_ROOT_PATH} \ + && make -j4 \ + && make install -j4 \ + && rm -f /usr/local/bin/python \ + && rm -f /usr/local/bin/pip \ + && ln -s ${PYTHON_ROOT_PATH}/bin/python3.7 /usr/local/bin/python \ + && ln -s ${PYTHON_ROOT_PATH}/bin/pip3.7 /usr/local/bin/pip \ + && rm -rf /tmp/cpython-3.7.5 \ + && rm -f /tmp/v3.7.5.tar.gz + +# Set pip source +RUN mkdir -pv /root/.pip \ + && echo "[global]" > /root/.pip/pip.conf \ + && echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \ + && echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf + +# Install MindSpore cpu whl package +RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.0/MindSpore/cpu/ubuntu_x86/mindspore-1.1.0-cp37-cp37m-linux_x86_64.whl diff --git a/docker/mindspore-cpu/devel/Dockerfile b/docker/mindspore-cpu/devel/Dockerfile index 4baffc2ee68..ec611bc7ea9 100644 --- a/docker/mindspore-cpu/devel/Dockerfile +++ b/docker/mindspore-cpu/devel/Dockerfile @@ -37,6 +37,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y \ automake \ flex +# Install the rest dependent tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + libnuma-dev + # Set bash RUN echo "dash dash/sh boolean false" | debconf-set-selections RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash diff --git a/docker/mindspore-cpu/runtime/Dockerfile b/docker/mindspore-cpu/runtime/Dockerfile index ccf5f297a0c..b84ac946152 100644 --- a/docker/mindspore-cpu/runtime/Dockerfile +++ b/docker/mindspore-cpu/runtime/Dockerfile @@ -35,6 +35,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y \ automake \ flex +# Install the rest dependent tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + libnuma-dev + # Set bash RUN echo "dash dash/sh boolean false" | debconf-set-selections RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash diff --git a/docker/mindspore-gpu/1.1.0/Dockerfile b/docker/mindspore-gpu/1.1.0/Dockerfile new file mode 100644 index 00000000000..a74a41cf09a --- /dev/null +++ b/docker/mindspore-gpu/1.1.0/Dockerfile @@ -0,0 +1,85 @@ +FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 + +MAINTAINER leonwanghui + +# Set env +ENV PYTHON_ROOT_PATH /usr/local/python-3.7.5 +ENV OMPI_ROOT_PATH /usr/local/openmpi-3.1.5 +ENV PATH ${OMPI_ROOT_PATH}/bin:/usr/local/bin:$PATH +ENV LD_LIBRARY_PATH ${OMPI_ROOT_PATH}/lib:$LD_LIBRARY_PATH + +# Install base tools +RUN apt update \ + && DEBIAN_FRONTEND=noninteractive apt install -y \ + vim \ + wget \ + curl \ + xz-utils \ + net-tools \ + openssh-client \ + git \ + ntpdate \ + tzdata \ + tcl \ + sudo \ + bash-completion + +# Install compile tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + gcc \ + g++ \ + zlibc \ + make \ + libgmp-dev \ + patch \ + autoconf \ + libtool \ + automake \ + flex + +# Install the rest dependent tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + libnuma-dev + +# Set bash +RUN echo "dash dash/sh boolean false" | debconf-set-selections +RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash + +# Install python (v3.7.5) +RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \ + libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \ + && cd /tmp \ + && wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \ + && tar -xvf v3.7.5.tar.gz \ + && cd /tmp/cpython-3.7.5 \ + && mkdir -p ${PYTHON_ROOT_PATH} \ + && ./configure --prefix=${PYTHON_ROOT_PATH} \ + && make -j4 \ + && make install -j4 \ + && rm -f /usr/local/bin/python \ + && rm -f /usr/local/bin/pip \ + && ln -s ${PYTHON_ROOT_PATH}/bin/python3.7 /usr/local/bin/python \ + && ln -s ${PYTHON_ROOT_PATH}/bin/pip3.7 /usr/local/bin/pip \ + && rm -rf /tmp/cpython-3.7.5 \ + && rm -f /tmp/v3.7.5.tar.gz + +# Set pip source +RUN mkdir -pv /root/.pip \ + && echo "[global]" > /root/.pip/pip.conf \ + && echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \ + && echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf + +# Install openmpi (v3.1.5) +RUN cd /tmp \ + && wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.5.tar.gz \ + && tar -xvf openmpi-3.1.5.tar.gz \ + && cd /tmp/openmpi-3.1.5 \ + && mkdir -p ${OMPI_ROOT_PATH} \ + && ./configure --prefix=${OMPI_ROOT_PATH} \ + && make -j4 \ + && make install -j4 \ + && rm -rf /tmp/openmpi-3.1.5 \ + && rm -f /tmp/openmpi-3.1.5.tar.gz + +# Install MindSpore cuda-10.1 whl package +RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.0/MindSpore/gpu/ubuntu_x86/cuda-10.1/mindspore_gpu-1.1.0-cp37-cp37m-linux_x86_64.whl diff --git a/docker/mindspore-gpu/devel/Dockerfile b/docker/mindspore-gpu/devel/Dockerfile index 10c5dd70454..a4ab628364f 100644 --- a/docker/mindspore-gpu/devel/Dockerfile +++ b/docker/mindspore-gpu/devel/Dockerfile @@ -37,6 +37,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y \ automake \ flex +# Install the rest dependent tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + libnuma-dev + # Configure cuDNN (v7.6.5) RUN ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5 /usr/local/cuda/lib64/libcudnn.so diff --git a/docker/mindspore-gpu/runtime/Dockerfile b/docker/mindspore-gpu/runtime/Dockerfile index 4b0cf0bf788..9ff9b71a246 100644 --- a/docker/mindspore-gpu/runtime/Dockerfile +++ b/docker/mindspore-gpu/runtime/Dockerfile @@ -37,6 +37,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y \ automake \ flex +# Install the rest dependent tools +RUN DEBIAN_FRONTEND=noninteractive apt install -y \ + libnuma-dev + # Set bash RUN echo "dash dash/sh boolean false" | debconf-set-selections RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash