You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 2.5 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. FROM nvidia/cuda:9.2-cudnn7-devel-ubuntu18.04
  2. MAINTAINER leonwanghui <leon.wanghui@huawei.com>
  3. # Set env
  4. ENV PYTHON_ROOT_PATH /usr/local/python-3.7.5
  5. ENV CMAKE_ROOT_PATH /usr/local/cmake-3.14.1
  6. ENV PATH ${PYTHON_ROOT_PATH}/bin:${CMAKE_ROOT_PATH}/bin:/usr/local/bin:$PATH
  7. # Install base tools
  8. RUN apt update \
  9. && DEBIAN_FRONTEND=noninteractive apt install -y \
  10. vim \
  11. wget \
  12. xz-utils \
  13. net-tools \
  14. openssh-client \
  15. git \
  16. subversion \
  17. ntpdate \
  18. tzdata \
  19. tcl \
  20. sudo
  21. # Install compile tools
  22. RUN DEBIAN_FRONTEND=noninteractive apt install -y \
  23. gcc \
  24. g++ \
  25. make \
  26. libgmp-dev \
  27. patch \
  28. autoconf \
  29. libtool \
  30. automake \
  31. flex
  32. # Set bash
  33. RUN echo "dash dash/sh boolean false" | debconf-set-selections
  34. RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
  35. # Install python (v3.7.5)
  36. RUN apt install -y --no-install-recommends libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev libgdbm-dev liblzma-dev libreadline-dev \
  37. && cd /tmp \
  38. && wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
  39. && tar -xvf v3.7.5.tar.gz \
  40. && cd /tmp/cpython-3.7.5 \
  41. && mkdir -p ${PYTHON_ROOT_PATH} \
  42. && ./configure --prefix=${PYTHON_ROOT_PATH} \
  43. && make -j4 \
  44. && make install -j4 \
  45. && rm -f /usr/local/bin/python \
  46. && rm -f /usr/local/bin/pip \
  47. && ln -s ${PYTHON_ROOT_PATH}/bin/python3.7 /usr/local/bin/python \
  48. && ln -s ${PYTHON_ROOT_PATH}/bin/pip3.7 /usr/local/bin/pip \
  49. && rm -rf /tmp/cpython-3.7.5 \
  50. && rm -f /tmp/v3.7.5.tar.gz
  51. # Set pip source
  52. RUN mkdir -pv /root/.pip \
  53. && echo "[global]" > /root/.pip/pip.conf \
  54. && echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \
  55. && echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf
  56. # Install pip package
  57. RUN pip install numpy \
  58. && pip install wheel \
  59. && pip install nose \
  60. && pip install pytest \
  61. && pip install pytest-xdist \
  62. && pip list
  63. # Install cmake (v3.14.1)
  64. RUN cd /tmp \
  65. && wget https://github.com/Kitware/CMake/releases/download/v3.14.1/cmake-3.14.1-Linux-x86_64.sh \
  66. && mkdir -p ${CMAKE_ROOT_PATH} \
  67. && bash ./cmake-3.14.1-Linux-x86_64.sh --prefix=${CMAKE_ROOT_PATH} --exclude-subdir --skip-license \
  68. && rm -f /tmp/cmake-3.14.1-Linux-x86_64.sh
  69. # Install MindSpore cuda-9.2 whl package
  70. RUN pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/0.1.0-alpha/MindSpore/gpu/cuda-9.2/mindspore-0.1.0-cp37-cp37m-linux_x86_64.whl

MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios.