lebeg commented on a change in pull request #12388: Installation instructions consolidation URL: https://github.com/apache/incubator-mxnet/pull/12388#discussion_r213610179
########## File path: docs/install/index.md ########## @@ -385,2146 +267,796 @@ Follow the four steps in this [docker documentation](https://docs.docker.com/eng If you skip this step, you need to use *sudo* each time you invoke Docker. -**Step 3** Pull the MXNet docker image. +**Step 3** Install *nvidia-docker-plugin* following the [installation instructions](https://github.com/NVIDIA/nvidia-docker/wiki/Installation). *nvidia-docker-plugin* is required to enable the usage of GPUs from the docker containers. -```bash -$ docker pull mxnet/python # Use sudo if you skip Step 2 +**Step 4** Pull the MXNet docker image. + +``` +$ docker pull mxnet/python:gpu # Use sudo if you skip Step 2 ``` You can list docker images to see if mxnet/python docker image pull was successful. -```bash +``` $ docker images # Use sudo if you skip Step 2 REPOSITORY TAG IMAGE ID CREATED SIZE -mxnet/python latest 00d026968b3c 3 weeks ago 1.41 GB +mxnet/python gpu 493b2683c269 3 weeks ago 4.77 GB ``` -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +**Step 5** <a href="validate_mxnet.html">Validate the installation</a>. </div> <!-- END of docker --> <div class="build-from-source"> <br/> +Refer to the <a href="ubuntu_setup.html">MXNet Ubuntu installation guide</a>. -Building *MXNet* from source is a 2 step process. -1. Build the *MXNet* core shared library, `libmxnet.so`, from the C++ sources. -2. Build the language specific bindings. Example - Python bindings, Scala bindings. -**Minimum Requirements** -1. [GCC 4.8](https://gcc.gnu.org/gcc-4.8/) or later to compile C++ 11. -2. [GNU Make](https://www.gnu.org/software/make/) +</div> <!-- END of build from source --> +</div> <!-- END of GPU --> +</div> <!-- END of Python --> +<!-- END - Linux Python GPU Installation Instructions --> -<br/> -**Build the MXNet core shared library** +<div class="r"> +<div class="cpu"> -**Step 1** Install build tools and git. -```bash -$ sudo apt-get update -$ sudo apt-get install -y build-essential git -``` +The default version of R that is installed with `apt-get` is insufficient. You will need to first [install R v3.4.4+ and build MXNet from source](ubuntu_setup.html#install-the-mxnet-package-for-r). -**Step 2** Install OpenBLAS. +After you have setup R v3.4.4+ and MXNet, you can build and install the MXNet R bindings with the following, assuming that `incubator-mxnet` is the source directory you used to build MXNet as follows: -*MXNet* uses [BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) and [LAPACK](https://en.wikipedia.org/wiki/LAPACK) libraries for accelerated numerical computations on CPU machine. There are several flavors of BLAS/LAPACK libraries - [OpenBLAS](http://www.openblas.net/), [ATLAS](http://math-atlas.sourceforge.net/) and [MKL](https://software.intel.com/en-us/intel-mkl). In this step we install OpenBLAS. You can choose to install ATLAS or MKL. -```bash -$ sudo apt-get install -y libopenblas-dev liblapack-dev ``` +$ cd incubator-mxnet +$ make rpkg +``` + +</div> <!-- END of CPU --> -**Step 3** Install OpenCV. -*MXNet* uses [OpenCV](http://opencv.org/) for efficient image loading and augmentation operations. -```bash -$ sudo apt-get install -y libopencv-dev -``` +<div class="gpu"> + +The default version of R that is installed with `apt-get` is insufficient. You will need to first [install R v3.4.4+ and build MXNet from source](ubuntu_setup.html#install-the-mxnet-package-for-r). -**Step 4** Download MXNet sources and build MXNet core shared library. You can clone the repository as described in the following code block, or you may try the <a href="download.html">download links</a> for your desired MXNet version. +After you have setup R v3.4.4+ and MXNet, you can build and install the MXNet R bindings with the following, assuming that `incubator-mxnet` is the source directory you used to build MXNet as follows: -```bash -$ git clone --recursive https://github.com/apache/incubator-mxnet +``` $ cd incubator-mxnet -$ make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas +$ make rpkg ``` -*Note* - USE_OPENCV and USE_BLAS are make file flags to set compilation options to use OpenCV and BLAS library. You can explore and use more compilation options in `make/config.mk`. +</div> <!-- END of GPU --> +</div> <!-- END of R --> + +<div class="scala"> +<div class="gpu"> <br/> +You can use the Maven packages defined in the following `dependency` to include MXNet in your Scala project. Please refer to the <a href="scala_setup.html">MXNet-Scala setup guide</a> for a detailed set of instructions to help you with the setup process. -**Build the MXNet Python binding** - -**Step 1** Install prerequisites - python, setup-tools, python-pip and libfortran (required for Numpy). +<a href="https://mvnrepository.com/artifact/org.apache.mxnet/mxnet-full_2.11-linux-x86_64-gpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux gpu-green.svg" alt="maven badge"/></a> -```bash -$ sudo apt-get install -y python-dev python-setuptools python-pip libgfortran3 +```html +<dependency> + <groupId>org.apache.mxnet</groupId> + <artifactId>mxnet-full_2.11-linux-x86_64-gpu</artifactId> +</dependency> ``` +<br> +</div> <!-- End of gpu --> -**Step 2** Install the MXNet Python binding. - -```bash -$ cd python -$ pip install -e . -``` +<div class="cpu"> +<br/> +You can use the Maven packages defined in the following `dependency` to include MXNet in your Scala project. Please refer to the <a href="scala_setup.html">MXNet-Scala setup guide</a> for a detailed set of instructions to help you with the setup process. -Note that the `-e` flag is optional. It is equivalent to `--editable` and means that if you edit the source files, these changes will be reflected in the package installed. +<a href="https://mvnrepository.com/artifact/org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge"/></a> -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz +```html +<dependency> + <groupId>org.apache.mxnet</groupId> + <artifactId>mxnet-full_2.11-linux-x86_64-cpu</artifactId> +</dependency> ``` +<br> +</div> <!-- End of cpu --> +</div> <!-- End of scala --> -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). -</div><!-- END of build from source --> -</div><!-- END of CPU --> -<!-- END - Linux Python CPU Installation Instructions --> +<div class="julia"> +<div class="cpu gpu"> +</br> +Refer to the <a href="ubuntu_setup.html#install-the-mxnet-package-for-julia">Julia section of the MXNet Ubuntu installation guide</a>. -<!-- START - Linux Python GPU Installation Instructions --> +</div> <!-- End of cpu gpu --> +</div> <!-- End of julia --> -<div class="gpu"> +<div class="perl"> +<div class="cpu gpu"> +</br> +Refer to the <a href="ubuntu_setup.html#install-the-mxnet-package-for-perl">Perl section of the MXNet Ubuntu installation guide</a>. -The following installation instructions have been tested on Ubuntu 14.04 and 16.04. +</div> <!-- End of cpu gpu --> +</div> <!-- End of julia --> -**Prerequisites** -Install the following NVIDIA libraries to setup *MXNet* with GPU support: +<div class="cpp"> +<div class="cpu gpu"> +<br/> +<p>To enable the C++ package, build from source using `make USE_CPP_PACKAGE=1`. +<br/>Refer to the <a href="c_plus_plus.html">MXNet C++ setup guide</a> for more info.</p> +<br/> +</div> <!-- End of cpu gpu --> +</div> <!-- END - C++--> +<hr> +For more installation options, refer to the <a href="ubuntu_setup.html">MXNet Ubuntu installation guide</a>. -1. Install CUDA 9.0 following the NVIDIA's [installation guide](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/). -2. Install cuDNN 7 for CUDA 9.0 following the NVIDIA's [installation guide](https://developer.nvidia.com/cudnn). You may need to register with NVIDIA for downloading the cuDNN library. +</div> <!-- END - Linux --> -**Note:** Make sure to add CUDA install path to `LD_LIBRARY_PATH`. -Example - *export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH* +<!-- START - MacOS Python CPU Installation Instructions --> +<div class="macos"> +<div class="python"> +<div class="cpu"> <div class="pip"> -<br/> - -**Step 1** Install prerequisites - wget and latest pip. - -Installing *MXNet* with pip requires a latest version of `pip`. Install the latest version of `pip` by issuing the following command in the terminal. +<div class="v1-2-1"> -```bash -$ sudo apt-get update -$ sudo apt-get install -y wget python -$ wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py +``` +$ pip install mxnet ``` -<div class="v1-2-1"> +</div> <!-- End of v1-2-1 --> -**Step 2** Install *MXNet* with GPU support using CUDA 9.2 -**Important**: Make sure your installed CUDA version matches the CUDA version in the pip package. -Check your CUDA version with the following command: +<div class="v1-1-0"> -```bash -nvcc --version ``` - -You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version. - -```bash -$ pip install mxnet-cu92 +$ pip install mxnet==1.1.0 ``` -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). +</div> <!-- End of v1-1-0--> -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz -``` -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +<div class="v1-0-0"> -**Experimental Choice** If You would like to install mxnet with Intel MKL, try the experimental pip package with MKL: -```bash -$ pip install mxnet-cu90mkl +``` +$ pip install mxnet==1.0.0 ``` -</div> <!-- End of v1-2-1--> - - -<div class="v1-1-0"> - -**Step 2** Install *MXNet* with GPU support using CUDA 9.1 +</div> <!-- End of v1-0-0--> -**Important**: Make sure your installed CUDA version matches the CUDA version in the pip package. -Check your CUDA version with the following command: +<div class="v0-12-1"> -```bash -nvcc --version +``` +$ pip install mxnet=0.12.1 ``` -You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version. +</div> <!-- End of v0-12-1--> -```bash -$ pip install mxnet-cu91==1.1.0 -``` -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). +<div class="v0-11-0"> -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz ``` +$ pip install mxnet==0.11.0 +``` + +</div> <!-- End of v0-11-0--> -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +<div class="master"> -**Experimental Choice** If You would like to install MXNet with Intel MKL, try the experimental pip package with MKL: -```bash -$ pip install mxnet-cu91mkl==1.1.0 +``` +$ pip install mxnet --pre ``` -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). +</div> <!-- End of master--> +<hr> +Refer to <a href="https://pypi.org/project/mxnet/">PyPI for other MXNet pip packages</a>, or <a href="validate_mxnet.html">validate your MXNet installation</a>. -</div> <!-- End of v1-1-0--> +</div> <!-- END of pip --> -<div class="v1-0-0"> +<div class="docker"> +<br/> -**Step 2** Install *MXNet* with GPU support using CUDA 9.0 +Docker images with *MXNet* are available at [Docker Hub](https://hub.docker.com/r/mxnet/). -```bash -$ pip install mxnet-cu90==1.0.0 -``` +**Step 1** Install Docker on your machine by following the [docker installation instructions](https://docs.docker.com/docker-for-mac/install/#install-and-run-docker-for-mac). -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz -``` +*Note* - You can install Community Edition (CE) to get started with *MXNet*. -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +**Step 2** Pull the MXNet docker image. -**Experimental Choice** If You would like to install mxnet with Intel MKL, try the experimental pip package with MKL: -```bash -$ pip install mxnet-cu90mkl==1.0.0 ``` - -</div> <!-- End of v1-0-0--> - - -<div class="v0-12-1"> - -**Step 2** Install *MXNet* with GPU support using CUDA 9.0 - -```bash -$ pip install mxnet-cu90==0.12.1 +$ docker pull mxnet/python ``` -For *MXNet* 0.12.0 - - -```bash -$ pip install mxnet-cu90==0.12.0 -``` +You can list docker images to see if mxnet/python docker image pull was successful. -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz ``` +$ docker images -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). - -**Experimental Choice** If You would like to install mxnet with Intel MKL, try the experimental pip package with MKL: -```bash -$ pip install mxnet-cu90mkl==0.12.1 +REPOSITORY TAG IMAGE ID CREATED SIZE +mxnet/python latest 00d026968b3c 3 weeks ago 1.41 GB ``` -For *MXNet* 0.12.0 - - -```bash -$ pip install mxnet-cu90mkl==0.12.0 -``` +**Step 4** <a href="validate_mxnet.html">Validate the installation</a>. -</div> <!-- End of v0-12-1--> +</div> <!-- END of docker --> -<div class="v0-11-0"> +<div class="build-from-source"> +<br/> -**Step 2** Install *MXNet* with GPU support using CUDA 8.0 +To build from source, refer to the <a href="osx_setup.html">MXNet macOS installation guide</a>. -```bash -$ pip install mxnet-cu80==0.11.0 -``` +MXNet developers should refer to the MXNet wiki's <a href="https://cwiki.apache.org/confluence/display/MXNET/MXNet+Developer+Setup+on+Mac">Developer Setup on Mac</a>. +<br/> +</div> <!-- END of build from source --> +</div> <!-- END of CPU --> -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz -``` -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +<!-- START - Mac OS Python GPU Installation Instructions --> +<div class="gpu"> +<div class="pip docker"> +<br/> +This option is only available by building from source. Refer to the <a href="osx_setup.html">MXNet macOS installation guide</a>. +<br/> +</div> -**Experimental Choice** If You would like to install MXNet with Intel MKL, try the experimental pip package with MKL: -```bash -$ pip install mxnet-cu80mkl==0.11.0 -``` +<div class="build-from-source"> +<br/> -</div> <!-- End of v0-11-0--> +Refer to the <a href="osx_setup.html">MXNet macOS installation guide</a>. +MXNet developers should refer to the MXNet wiki's <a href="https://cwiki.apache.org/confluence/display/MXNET/MXNet+Developer+Setup+on+Mac">Developer Setup on Mac</a>. +<br/> +</div> <!-- END of build from source --> +</div> <!-- END of GPU --> +</div> <!-- END of Python --> -</div> <!-- END of pip --> -<div class="virtualenv"> +<!-- START - MacOS R CPU Installation Instructions --> -<br/> +<div class="r"> +<div class="cpu"> +</br> -**Step 1** Install virtualenv for Ubuntu. +Install the latest version (3.5.1+) of R from [CRAN](https://cran.r-project.org/bin/macosx/). +You can [build MXNet-R from source](osx_setup.html#install-the-mxnet-package-for-r), or you can use a pre-built binary: -```bash -$ sudo apt-get update -$ sudo apt-get install -y python-dev python-virtualenv +```r +cran <- getOption("repos") +cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/" +options(repos = cran) +install.packages("mxnet") ``` -**Step 2** Create and activate virtualenv environment for MXNet. +</div> <!-- END of CPU --> -Following command creates a virtualenv environment at `~/mxnet` directory. However, you can choose any directory by replacing `~/mxnet` with a directory of your choice. -```bash -$ virtualenv --system-site-packages ~/mxnet -``` +<div class="gpu"> +</br> +Will be available soon. -Activate the virtualenv environment created for *MXNet*. +</div> <!-- END of GPU --> +</div> <!-- END of R --> -```bash -$ source ~/mxnet/bin/activate -``` +<div class="scala"> +<div class="cpu"> +</br> +You can use the Maven packages defined in the following `dependency` to include MXNet in your Scala project. Please refer to the <a href="scala_setup.html">MXNet-Scala setup guide</a> for a detailed set of instructions to help you with the setup process. -After activating the environment, you should see the prompt as below. +<a href="https://mvnrepository.com/artifact/org.apache.mxnet/mxnet-full_2.11-osx-x86_64-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-mac cpu-green.svg" alt="maven badge"/></a> -```bash -(mxnet)$ +```html +<dependency> + <groupId>org.apache.mxnet</groupId> + <artifactId>mxnet-full_2.11-osx-x86_64-cpu</artifactId> +</dependency> ``` +<br> +</div> <!-- End of cpu --> +<div class="gpu"> -**Step 3** Install MXNet in the active virtualenv environment. - -Installing *MXNet* with pip requires a latest version of `pip`. Install the latest version of `pip` by issuing the following command. +Not available at this time. <br> -```bash -(mxnet)$ pip install --upgrade pip -``` +</div> +</div> <!-- End of scala --> -<div class="v1-2-1"> -**Important**: Make sure your installed CUDA version matches the CUDA version in the pip package. -Check your CUDA version with the following command: +<div class="julia"> +<div class="cpu gpu"> +</br> +Refer to the <a href="osx_setup.html#install-the-mxnet-package-for-julia">Julia section of the MXNet macOS installation guide</a>. -```bash -nvcc --version -``` +</div> <!-- End of cpu gpu --> +</div> <!-- End of julia --> -You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version. +<div class="perl"> +<div class="cpu gpu"> +</br> +Refer to the <a href="osx_setup.html#install-the-mxnet-package-for-perl">Perl section of the MXNet macOS installation guide</a>. -Install *MXNet* with GPU support using CUDA 9.2: +</div> <!-- End of cpu gpu --> +</div> <!-- End of julia --> -```bash -(mxnet)$ pip install mxnet-cu92 -``` -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). -</div> <!-- End of v1-2-1--> +<div class="cpp"> +<br/> +<p>To enable the C++ package, build from source using `make USE_CPP_PACKAGE=1`. +<br/>Refer to the <a href="c_plus_plus.html">MXNet C++ setup guide</a> for more info.</p> +<br/> +</div> +<hr> +For more installation options, refer to the <a href="osx_setup.html">MXNet macOS installation guide</a>. +</div> <!-- END - Mac OS --> -<div class="v1-1-0"> -**Important**: Make sure your installed CUDA version matches the CUDA version in the pip package. -Check your CUDA version with the following command: +<div class="windows"> +<div class="python"> +<div class="cpu"> +<div class="pip"> +<div class="v1-2-1"> -```bash -nvcc --version +``` +$ pip install mxnet ``` -You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version. +</div> <!-- End of v1-2-1--> -Install *MXNet* with GPU support using CUDA 9.1: +<div class="v1-1-0"> -```bash -(mxnet)$ pip install mxnet-cu91==1.1.0 ``` - -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). +$ pip install mxnet==1.1.0 +``` </div> <!-- End of v1-1-0--> - <div class="v1-0-0"> -Install *MXNet* with GPU support using CUDA 9.0. - -```bash -(mxnet)$ pip install mxnet-cu90==1.0.0 ``` -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). +$ pip install mxnet==1.0.0 +``` </div> <!-- End of v1-0-0--> - <div class="v0-12-1"> -Install *MXNet* with GPU support using CUDA 9.0. - -```bash -(mxnet)$ pip install mxnet-cu90==0.12.1 ``` - -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). +$ pip install mxnet==0.12.1 +``` </div> <!-- End of v0-12-1--> - <div class="v0-11-0"> -Install *MXNet* with GPU support using CUDA 8.0. - -```bash -(mxnet)$ pip install mxnet-cu80==0.11.0 +``` +$ pip install mxnet==0.11.0 ``` </div> <!-- End of v0-11-0--> <div class="master"> -**Important**: Make sure your installed CUDA version matches the CUDA version in the pip package. -Check your CUDA version with the following command: - -```bash -nvcc --version ``` - -You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version. - -Install *MXNet* with GPU support using CUDA 9.2. - -```bash -(mxnet)$ pip install mxnet-cu92 --pre +$ pip install mxnet --pre ``` -Refer to [pypi for older packages](https://pypi.org/project/mxnet/). - </div> <!-- End of master--> +<hr> +Refer to <a href="https://pypi.org/project/mxnet/">PyPI for other MXNet pip packages</a>, or <a href="validate_mxnet.html">validate your MXNet installation</a>. -**Step 4** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz -``` - -**Step 5** Validate the installation by running simple *MXNet* code described [here](#validate-mxnet-installation). - -**Note** You can read more about virtualenv [here](https://virtualenv.pypa.io/en/stable/userguide/). - -</div> <!-- END of virtualenv --> +</div> <!-- End of pip --> -<div class="docker"> +<div class="docker build-from-source"> <br/> -Docker images with *MXNet* are available at [Docker Hub](https://hub.docker.com/r/mxnet/). +Refer to the <a href="windows_setup.html">MXNet Windows installation guide</a>. -**Step 1** Install Docker on your machine by following the [docker installation instructions](https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository). -*Note* - You can install Community Edition (CE) to get started with *MXNet*. +</div> <!-- End of docker build-from-source --> +</div> <!-- End of CPU --> -**Step 2** [Optional] Post installation steps to manage Docker as a non-root user. -Follow the four steps in this [docker documentation](https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user) to allow managing docker containers without *sudo*. +<div class="gpu"> +<div class="pip"> +<div class="v1-2-1"> -If you skip this step, you need to use *sudo* each time you invoke Docker. +``` +$ pip install mxnet-cu92 +``` -**Step 3** Install *nvidia-docker-plugin* following the [installation instructions](https://github.com/NVIDIA/nvidia-docker/wiki/Installation). *nvidia-docker-plugin* is required to enable the usage of GPUs from the docker containers. +</div> <!-- End of v1-2-1--> -**Step 4** Pull the MXNet docker image. +<div class="v1-1-0"> -```bash -$ docker pull mxnet/python:gpu # Use sudo if you skip Step 2 +``` +$ pip install mxnet-cu91==1.1.0 ``` -You can list docker images to see if mxnet/python docker image pull was successful. +</div> <!-- End of v1-1-0--> -```bash -$ docker images # Use sudo if you skip Step 2 +<div class="v1-0-0"> -REPOSITORY TAG IMAGE ID CREATED SIZE -mxnet/python gpu 493b2683c269 3 weeks ago 4.77 GB +``` +$ pip install mxnet-cu90==1.0.0 ``` -**Step 5** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +</div> <!-- End of v1-0-0--> -</div> <!-- END of docker --> +<div class="v0-12-1"> -<div class="build-from-source"> +``` +$ pip install mxnet-cu90==0.12.1 +``` -<br/> +</div> <!-- End of v0-12-1--> -Building *MXNet* from source is a 2 step process. -1. Build the *MXNet* core shared library, `libmxnet.so`, from the C++ sources. -2. Build the language specific bindings. Example - Python bindings, Scala bindings. +<div class="v0-11-0"> -**Minimum Requirements** -1. [GCC 4.8](https://gcc.gnu.org/gcc-4.8/) or later to compile C++ 11. -2. [GNU Make](https://www.gnu.org/software/make/) +``` +$ pip install mxnet-cu80==0.11.0 +``` -<br/> +</div> <!-- End of v0-11-0--> -**Build the MXNet core shared library** +<div class="master"> -**Step 1** Install build tools and git. -```bash -$ sudo apt-get update -$ sudo apt-get install -y build-essential git ``` -**Step 2** Install OpenBLAS. - -*MXNet* uses [BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) and [LAPACK](https://en.wikipedia.org/wiki/LAPACK) libraries for accelerated numerical computations on CPU machine. There are several flavors of BLAS/LAPACK libraries - [OpenBLAS](http://www.openblas.net/), [ATLAS](http://math-atlas.sourceforge.net/) and [MKL](https://software.intel.com/en-us/intel-mkl). In this step we install OpenBLAS. You can choose to install ATLAS or MKL. -```bash -$ sudo apt-get install -y libopenblas-dev liblapack-dev +$ pip install mxnet-cu92 --pre ``` -**Step 3** Install OpenCV. +</div> <!-- End of master--> +<hr> -*MXNet* uses [OpenCV](http://opencv.org/) for efficient image loading and augmentation operations. -```bash -$ sudo apt-get install -y libopencv-dev -``` +**NOTES:** -**Step 4** Download MXNet sources and build MXNet core shared library. You can clone the repository as described in the following code block, or you may try the <a href="download.html">download links</a> for your desired MXNet version. +Refer to <a href="https://pypi.org/project/mxnet/">PyPI for other MXNet pip packages</a>, or <a href="validate_mxnet.html">validate your MXNet installation</a>. -```bash -$ git clone --recursive https://github.com/apache/incubator-mxnet -$ cd incubator-mxnet -$ make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 -``` +[Anaconda](https://www.anaconda.com/download/) is recommended. -*Note* - USE_OPENCV, USE_BLAS, USE_CUDA, USE_CUDA_PATH AND USE_CUDNN are make file flags to set compilation options to use OpenCV, OpenBLAS, CUDA and cuDNN libraries. You can explore and use more compilation options in `make/config.mk`. Make sure to set USE_CUDA_PATH to right CUDA installation path. In most cases it is - */usr/local/cuda*. +CUDA should be installed first. Instructions can be found in the <a href="ubuntu_setup.html#cuda-dependencies">CUDA dependencies section of the MXNet Ubuntu installation guide</a>. -<br/> +**Important:** Make sure your installed CUDA version matches the CUDA version in the pip package. Check your CUDA version with the following command: -**Install the MXNet Python binding** +``` +nvcc --version +``` -**Step 1** Install prerequisites - python, setup-tools, python-pip and libfortran (required for Numpy).. +Refer to [#8671](https://github.com/apache/incubator-mxnet/issues/8671) for status on CUDA 9.1 support. -```bash -$ sudo apt-get install -y python-dev python-setuptools python-pip libgfortran3 -``` +You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version. -**Step 2** Install the MXNet Python binding. +</div> -```bash -$ cd python -$ pip install -e . -``` +<div class="build-from-source"> +<br/> -Note that the `-e` flag is optional. It is equivalent to `--editable` and means that if you edit the source files, these changes will be reflected in the package installed. +To build from source, refer to the <a href="windows_setup.html">MXNet Windows installation guide</a>. -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -sudo apt-get install graphviz -pip install graphviz -``` -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +</div> <!-- End of pip --> +</div> <!-- End of GPU --> +</div> <!-- End of Python --> -</div> <!-- END of build from source --> -</div> <!-- END of GPU --> -</div> <!-- END of Python --> -<!-- END - Linux Python GPU Installation Instructions --> +<!-- START - Windows R CPU Installation Instructions --> <div class="r"> <div class="cpu"> +</br> -The default version of R that is installed with `apt-get` is insufficient. You will need to first [install R v3.4.4+ and build MXNet from source](ubuntu_setup.html#install-the-mxnet-package-for-r). - -After you have setup R v3.4.4+ and MXNet, you can build and install the MXNet R bindings with the following, assuming that `incubator-mxnet` is the source directory you used to build MXNet as follows: +Install the latest version (3.5.1+) of R from [CRAN](https://cran.r-project.org/bin/windows/). +You can [build MXNet-R from source](windows_setup.html#install-mxnet-package-for-r), or you can use a pre-built binary: -```bash -$ cd incubator-mxnet -$ make rpkg +```r +cran <- getOption("repos") +cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/" +options(repos = cran) +install.packages("mxnet") ``` -</div> <!-- END of CPU --> - +</div> <!-- END - Windows R CPU --> <div class="gpu"> +</br> -The default version of R that is installed with `apt-get` is insufficient. You will need to first [install R v3.4.4+ and build MXNet from source](ubuntu_setup.html#install-the-mxnet-package-for-r). - -After you have setup R v3.4.4+ and MXNet, you can build and install the MXNet R bindings with the following, assuming that `incubator-mxnet` is the source directory you used to build MXNet as follows: +You can [build MXNet-R from source](windows_setup.html#install-mxnet-package-for-r), or you can use a pre-built binary: -```bash -$ cd incubator-mxnet -$ make rpkg +```r + cran <- getOption("repos") + cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/GPU/cu92" + options(repos = cran) + install.packages("mxnet") ``` +Change cu92 to cu80, cu90 or cu91 based on your CUDA toolkit version. Currently, MXNet supports these versions of CUDA. </div> <!-- END of GPU --> -</div> <!-- END of R --> - +</div> <!-- END - Windows R --> <div class="scala"> -<div class="gpu"> - -You can use the Maven packages defined in the following `dependency` to include MXNet in your Scala project. Please refer to the <a href="scala_setup.html">MXNet-Scala setup guide</a> for a detailed set of instructions to help you with the setup process. - -<a href="https://mvnrepository.com/artifact/org.apache.mxnet/mxnet-full_2.11-linux-x86_64-gpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux gpu-green.svg" alt="maven badge"/></a> - -```html -<dependency> - <groupId>org.apache.mxnet</groupId> - <artifactId>mxnet-full_2.11-linux-x86_64-gpu</artifactId> -</dependency> -``` -<br> -</div> <!-- End of gpu --> - -<div class="cpu"> - -You can use the Maven packages defined in the following `dependency` to include MXNet in your Scala project. Please refer to the <a href="scala_setup.html">MXNet-Scala setup guide</a> for a detailed set of instructions to help you with the setup process. - -<a href="https://mvnrepository.com/artifact/org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge"/></a> - -```html -<dependency> - <groupId>org.apache.mxnet</groupId> - <artifactId>mxnet-full_2.11-linux-x86_64-cpu</artifactId> -</dependency> -``` -<br> -</div> <!-- End of cpu --> +<div class="cpu gpu"> +<br/> +MXNet-Scala for Windows is not yet available. +<br/> +</div> <!-- End of cpu gpu --> </div> <!-- End of scala --> - -<div class="julia perl"> +<div class="julia"> <div class="cpu gpu"> - -Follow the installation instructions [in this guide](./ubuntu_setup.md) to set up MXNet. +</br> +Refer to the <a href="windows_setup.html#install-the-mxnet-package-for-julia">Julia section of the MXNet Windows installation guide</a>. </div> <!-- End of cpu gpu --> -</div> <!-- End of julia perl --> +</div> <!-- End of julia --> + +<div class="perl"> +<div class="cpu gpu"> +</br> +Refer to the <a href="windows_setup.html#install-the-mxnet-package-for-perl">Perl section of the MXNet Windows installation guide</a>. +</div> <!-- End of cpu gpu --> +</div> <!-- End of julia --> <div class="cpp"> <div class="cpu gpu"> -<p> To build the C++ package, please refer to <a href="build_from_source.html#build-the-c-package">this guide</a>. </p> +</br> +<p>To enable the C++ package, build from source using `make USE_CPP_PACKAGE=1`. +<br/>Refer to the <a href="c_plus_plus.html">MXNet C++ setup guide</a> for more info.</p> <br/> </div> <!-- End of cpu gpu --> -</div> <!-- END - C++--> -</div> <!-- END - Linux --> - - -<!-- START - MacOS Python CPU Installation Instructions --> - -<div class="macos"> -<div class="python"> -<div class="cpu"> - -The following installation instructions have been tested on OSX Sierra and El Capitan. +</div> <!-- End of C++ --> +<hr> +For more installation options, refer to the <a href="windows_setup.html">MXNet Windows installation guide</a>. +</div> <!-- End of Windows --> -<div class="pip"> -<br/> +<!-- START - Cloud Python Installation Instructions --> -**Step 1** Install prerequisites - Homebrew, python development tools. +<div class="cloud"> -```bash -# Install Homebrew -$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -$ export PATH=/usr/local/bin:/usr/local/sbin:$PATH +AWS Marketplace distributes Deep Learning AMIs (Amazon Machine Image) with MXNet pre-installed. You can launch one of these Deep Learning AMIs by following instructions in the [AWS Deep Learning AMI Developer Guide](http://docs.aws.amazon.com/dlami/latest/devguide/what-is-dlami.html). -# Install python development tools - python2.7, pip, python-setuptools -$ brew install python -``` +You can also run distributed deep learning with *MXNet* on AWS using [Cloudformation Template](https://github.com/awslabs/deeplearning-cfn/blob/master/README.md). -**Step 2** Install MXNet with OpenBLAS acceleration. +</div> <!-- END - Cloud Python Installation Instructions --> -Installing *MXNet* with pip requires a latest version of `pip`. Install the latest version of `pip` by issuing the following command. -```bash -$ pip install --upgrade pip -$ pip install --upgrade setuptools -``` +<!-- DEVICES --> +<div class="devices"> + <div class="raspberry-pi"> -<div class="v1-2-1"> +MXNet supports the Debian based Raspbian ARM based operating system so you can run MXNet on Raspberry Pi Devices. -Then use pip to install MXNet: +These instructions will walk through how to build MXNet for the Raspberry Pi and install the Python bindings for the library. -```bash -$ pip install mxnet -``` -</div> <!-- End of v1-2-1 --> +You can do a dockerized cross compilation build on your local machine or a native build on-device. +The complete MXNet library and its requirements can take almost 200MB of RAM, and loading large models with the library can take over 1GB of RAM. Because of this, we recommend running MXNet on the Raspberry Pi 3 or an equivalent device that has more than 1 GB of RAM and a Secure Digital (SD) card that has at least 4 GB of free memory. -<div class="v1-1-0"> +**Cross compilation build (Experimental)** -Then use pip to install MXNet: +## Docker installation +**Step 1** Install Docker on your machine by following the [docker installation instructions](https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository). -```bash -$ pip install mxnet==1.1.0 -``` +*Note* - You can install Community Edition (CE) -</div> <!-- End of v1-1-0--> +**Step 2** [Optional] Post installation steps to manage Docker as a non-root user. +Follow the four steps in this [docker documentation](https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user) to allow managing docker containers without *sudo*. -<div class="v1-0-0"> +## Build -Then use pip to install MXNet: +The following command will build a container with dependencies and tools and then compile MXNet for +ARMv7. The resulting artifact will be located in `build/mxnet-x.x.x-py2.py3-none-any.whl`, copy this +file to your Raspberry Pi. -```bash -$ pip install mxnet==1.0.0 +``` +ci/build.py -p armv7 ``` -</div> <!-- End of v1-0-0--> - -<div class="v0-12-1"> +## Install -Then use pip to install MXNet: +Create a virtualenv and install the package we created previously. -```bash -$ pip install mxnet=0.12.1 ``` - -For MXNet 0.12.0 - - -```bash -$ pip install mxnet=0.12.0 +virtualenv -p `which python3` mxnet_py3 +source mxnet_py3/bin/activate +pip install mxnet-x.x.x-py2.py3-none-any.whl ``` -</div> <!-- End of v0-12-1--> - - -<div class="v0-11-0"> - -Then use pip to install MXNet: - -```bash -$ pip install mxnet==0.11.0 -``` +**Native Build** -</div> <!-- End of v0-11-0--> +Installing MXNet is a two-step process: -<div class="master"> +1. Build the shared library from the MXNet C++ source code. +2. Install the supported language-specific packages for MXNet. -Then use pip to install MXNet: +**Step 1** Build the Shared Library -```bash -$ pip install mxnet --pre -``` +On Raspbian versions Wheezy and later, you need the following dependencies: -</div> <!-- End of master--> +- Git (to pull code from GitHub) -**Step 3** Install [Graphviz](http://www.graphviz.org/). (Optional, needed for graph visualization using `mxnet.viz` package). -```bash -$ brew install graphviz -$ pip install graphviz -``` +- libblas (for linear algebraic operations) -**Step 4** Validate the installation by running simple MXNet code described [here](#validate-mxnet-installation). +- libopencv (for computer vision operations. This is optional if you want to save RAM and Disk Space) -</div> <!-- END of pip --> +- A C++ compiler that supports C++ 11. The C++ compiler compiles and builds MXNet source code. Supported compilers include the following: +- [G++ (4.8 or later)](https://gcc.gnu.org/gcc-4.8/). Make sure to use gcc 4 and not 5 or 6 as there Review comment: Clang 3.9 - 6 as well ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
