You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/07/03 13:53:42 UTC
[GitHub] marcoabreu closed pull request #11503: updating installation info
to have latest packages and more clarity
marcoabreu closed pull request #11503: updating installation info to have latest packages and more clarity
URL: https://github.com/apache/incubator-mxnet/pull/11503
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/install/ubuntu_setup.md b/docs/install/ubuntu_setup.md
index 7796b11ea6d..c2b5f9dd791 100644
--- a/docs/install/ubuntu_setup.md
+++ b/docs/install/ubuntu_setup.md
@@ -1,67 +1,103 @@
# Installing MXNet on Ubuntu
-**NOTE:** For MXNet with Python installation, please refer to the [new install guide](http://mxnet.io/install/index.html).
+The following installation instructions are for installing MXNet on computers running **Ubuntu 16.04**. Support for later versions of Ubuntu is [not yet available](#contributions).
+<hr>
-MXNet currently supports Python, R, Julia, Scala, and Perl. For users of R on Ubuntu operating systems, MXNet provides a set of Git Bash scripts that installs all of the required MXNet dependencies and the MXNet library.
+## Contents
-The simple installation scripts set up MXNet for Python and R on computers running Ubuntu 12 or later. The scripts install MXNet in your home folder ```~/mxnet```.
+* [CUDA Dependencies](#cuda-dependencies)
+* [Quick Installation](#quick-installation)
+ * [Python](#install-mxnet-for-python)
+ * [pip Packages](#pip-package-availability)
+* [Standard Installation](#standard-installation)
+* [Installing Language Packages](#installing-language-packages-for-mxnet)
+ * [R](#install-the-mxnet-package-for-r)
+ * [Julia](#install-the-mxnet-package-for-julia)
+ * [Scala](#install-the-mxnet-package-for-scala)
+ * [Perl](#install-the-mxnet-package-for-perl)
+ * [Contributions](#contributions)
+ * [Next Steps](#next-steps)
-## Prepare environment for GPU Installation
+<hr>
-If you plan to build with GPU, you need to set up the environment for CUDA and CUDNN.
+## CUDA Dependencies
-First, download and install [CUDA 8 toolkit](https://developer.nvidia.com/cuda-toolkit).
+If you plan to build with GPU, you need to set up the environment for CUDA and cuDNN.
-Then download [cudnn 6](https://developer.nvidia.com/cudnn).
+First, download and install [CUDA toolkit](https://developer.nvidia.com/cuda-toolkit). CUDA 9.2 is recommended.
-Unzip the file and change to the cudnn root directory. Move the header and libraries to your local CUDA Toolkit folder:
+Then download [cuDNN 7.1.4](https://developer.nvidia.com/cudnn).
+
+Unzip the file and change to the cuDNN root directory. Move the header and libraries to your local CUDA Toolkit folder:
```bash
- tar xvzf cudnn-8.0-linux-x64-v6.0.tgz
+ tar xvzf cudnn-9.2-linux-x64-v7.1
sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
sudo ldconfig
```
-Finally, add configurations to config.mk file:
+<hr>
-```bash
- cp make/config.mk .
-```
## Quick Installation
-### Install MXNet for R
+### Install MXNet for Python
-MXNet requires R-version to be 3.2.0 and above. If you are running an earlier version of R, run below commands to update your R version, before running the installation script.
+#### Dependencies
-```bash
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- sudo add-apt-repository ppa:marutter/rdev
+The following scripts will install Ubuntu 16.04 dependencies for MXNet Python development.
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install r-base r-base-dev
+```bash
+wget https://raw.githubusercontent.com/apache/incubator-mxnet/master/ci/docker/install/ubuntu_core.sh
+wget https://raw.githubusercontent.com/apache/incubator-mxnet/master/ci/docker/install/ubuntu_python.sh
+sudo ./ubuntu_core.sh
+sudo ./ubuntu_python.sh
```
-To install MXNet for R:
+Using the latest MXNet with CUDA 9.2 package is recommended for the fastest training speeds with MXNet.
+**Recommended for training:**
```bash
- # Clone mxnet repository. In terminal, run the commands WITHOUT "sudo"
- git clone https://github.com/dmlc/mxnet.git ~/mxnet --recursive
-
- cd ~/mxnet
- cp make/config.mk .
- # If building with GPU, add configurations to config.mk file:
- echo "USE_CUDA=1" >>config.mk
- echo "USE_CUDA_PATH=/usr/local/cuda" >>config.mk
- echo "USE_CUDNN=1" >>config.mk
+pip install mxnet-cu92
+```
- cd ~/mxnet/setup-utils
- bash install-mxnet-ubuntu-r.sh
+**Recommended for inference:**
+```bash
+pip install mxnet-cu92mkl
```
-The installation script to install MXNet for R can be found [here](https://raw.githubusercontent.com/dmlc/mxnet/master/setup-utils/install-mxnet-ubuntu-r.sh).
+
+Alternatively, you can use the table below to select the package that suits your purpose.
+
+| MXNet Version | Basic | CUDA | MKL | CUDA/MKL |
+|-|-|-|-|-|
+| Latest | mxnet | mxnet-cu92 | mxnet-mkl | mxnet-cu92mkl |
+
+
+#### pip Package Availability
+
+The following table presents the pip packages that are recommended for each version of MXNet.
+
+<!-- Must find sol'n for both github and website; image in the meantime
+| Package / MXNet Version | 1.2.1 | 1.1.0 | 1.0.0 | 0.12.1 | 0.11.0 |
+|-|-|-|-|-|-|
+| mxnet-cu92mkl | :white_check_mark:<i class="fas fa-check"></i> | :x: | :x: | :x: | :x: |
+| mxnet-cu92 | :white_check_mark:<i class="fas fa-check"></i> | :x: | :x: | :x: | :x: |
+| mxnet-cu90mkl | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
+| mxnet-cu90 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
+| mxnet-cu80mkl | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+| mxnet-cu80 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+| mxnet-mkl | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+| mxnet | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+-->
+
+
+
+To install an older version of MXNet with one of the packages in the previous table add `==` with the version you require. For example for version 1.1.0 of MXNet with CUDA 8, you would use `pip install mxnet-cu80==1.1.0`.
+
+<hr>
+
## Standard installation
@@ -70,19 +106,19 @@ Installing MXNet is a two-step process:
1. Build the shared library from the MXNet C++ source code.
2. Install the supported language-specific packages for MXNet.
-**Note:** To change the compilation options for your build, edit the ```make/config.mk``` file and submit a build request with the ```make``` command.
+**Note:** To change the compilation options for your build, edit the ```make/config.mk``` file prior to building MXNet. More information on this is mentioned in the different language package instructions.
### Build the Shared Library
On Ubuntu versions 13.10 or later, you need the following dependencies:
-**Step 1** Install build tools and git.
+**Step 1:** Install build tools and git.
```bash
sudo apt-get update
sudo apt-get install -y build-essential git
```
-**Step 2** Install OpenBLAS.
+**Step 2:** Install OpenBLAS.
*MXNet* uses [BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) library for accelerated numerical computations on CPU machine. There are several flavors of BLAS 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.
@@ -90,7 +126,7 @@ On Ubuntu versions 13.10 or later, you need the following dependencies:
sudo apt-get install -y libopenblas-dev
```
-**Step 3** Install OpenCV.
+**Step 3:** Install OpenCV.
*MXNet* uses [OpenCV](http://opencv.org/) for efficient image loading and augmentation operations.
@@ -98,12 +134,12 @@ On Ubuntu versions 13.10 or later, you need the following dependencies:
sudo apt-get install -y libopencv-dev
```
-**Step 4** Download MXNet sources and build MXNet core shared library.
+**Step 4:** Download MXNet sources and build MXNet core shared library.
If building on CPU:
```bash
- git clone --recursive https://github.com/dmlc/mxnet
+ git clone --recursive https://github.com/apache/incubator-mxnet.git
cd mxnet
make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas
```
@@ -111,7 +147,7 @@ If building on CPU:
If building on GPU:
```bash
- git clone --recursive https://github.com/dmlc/mxnet
+ git clone --recursive https://github.com/apache/incubator-mxnet.git
cd mxnet
make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1
```
@@ -120,24 +156,69 @@ If building on GPU:
Executing these commands creates a library called ```libmxnet.so```.
-Next, we install ```graphviz``` library that we use for visualizing network graphs you build on MXNet. We will also install [Jupyter Notebook](http://jupyter.readthedocs.io/) used for running MXNet tutorials and examples.
+Next, you may optionally install ```graphviz``` library that is used for visualizing network graphs you build on MXNet. You may also install [Jupyter Notebook](http://jupyter.readthedocs.io/) which is used for running MXNet tutorials and examples.
```bash
sudo apt-get install -y python-pip
sudo pip install graphviz
- sudo pip install Jupyter
+ sudo pip install jupyter
```
+<hr>
+
-
+## Installing Language Packages for MXNet
-We have installed MXNet core library. Next, we will install MXNet interface package for programming language of your choice:
+After you have installed the MXNet core library. You may install MXNet interface packages for the programming language of your choice:
+- [Scala](#install-the-mxnet-package-for-scala)
- [R](#install-the-mxnet-package-for-r)
- [Julia](#install-the-mxnet-package-for-julia)
-- [Scala](#install-the-mxnet-package-for-scala)
- [Perl](#install-the-mxnet-package-for-perl)
+
+### Install the MXNet Package for Scala
+
+To use the MXNet-Scala package, you can acquire the Maven package as a dependency.
+
+Further information is in the [MXNet-Scala Setup Instructions](./scala_setup.md).
+
+If you use IntelliJ or a similar IDE, you may want to follow the [MXNet-Scala on IntelliJ tutorial](../tutorials/scala/mxnet_scala_on_intellij.md) instead.
+<hr>
+
### Install the MXNet Package for R
+#### MXNet-R Dependencies
+
+For users of R on Ubuntu operating systems, MXNet provides a set of Git Bash scripts that installs all of the required MXNet dependencies and the MXNet library. The scripts install MXNet in your home folder ```~/mxnet```.
+
+MXNet requires R-version to be 3.2.0 and above. If you are running an earlier version of R, run below commands to update your R version, before running the installation script.
+
+```bash
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
+ sudo add-apt-repository ppa:marutter/rdev
+
+ sudo apt-get update
+ sudo apt-get upgrade
+ sudo apt-get install r-base r-base-dev
+```
+
+To install MXNet for R:
+
+```bash
+ # Clone mxnet repository. In terminal, run the commands WITHOUT "sudo"
+ git clone https://github.com/dmlc/mxnet.git ~/mxnet --recursive
+
+ cd ~/mxnet
+ cp make/config.mk .
+ # If building with GPU, add configurations to config.mk file:
+ echo "USE_CUDA=1" >>config.mk
+ echo "USE_CUDA_PATH=/usr/local/cuda" >>config.mk
+ echo "USE_CUDNN=1" >>config.mk
+
+ cd ~/mxnet/setup-utils
+ bash install-mxnet-ubuntu-r.sh
+```
+The installation script to install MXNet for R can be found [here](https://raw.githubusercontent.com/dmlc/mxnet/master/setup-utils/install-mxnet-ubuntu-r.sh).
+
Run the following commands to install the MXNet dependencies and build the MXNet R package.
```r
@@ -157,6 +238,8 @@ These commands create the MXNet R package as a tar.gz file that you can install
```bash
R CMD INSTALL mxnet_current_r.tar.gz
```
+<hr>
+
### Install the MXNet Package for Julia
@@ -179,59 +262,9 @@ You might want to add this command to your ```~/.bashrc``` file. If you do, you
```
For more details about installing and using MXNet with Julia, see the [MXNet Julia documentation](http://dmlc.ml/MXNet.jl/latest/user-guide/install/).
+<hr>
-### Install the MXNet Package for Scala
-There are two ways to install the MXNet package for Scala:
-
-* Use the prebuilt binary package
-* Build the library from source code
-
-#### Use the Prebuilt Binary Package
-For Linux users, MXNet provides prebuilt binary packages that support computers with either GPU or CPU processors. To download and build these packages using ```Maven```, change the ```artifactId``` in the following Maven dependency to match your architecture:
-
-```HTML
-<dependency>
- <groupId>ml.dmlc.mxnet</groupId>
- <artifactId>mxnet-full_<system architecture></artifactId>
- <version>0.1.1</version>
-</dependency>
-```
-
-For example, to download and build the 64-bit CPU-only version for Linux, use:
-
-```HTML
-<dependency>
- <groupId>ml.dmlc.mxnet</groupId>
- <artifactId>mxnet-full_2.10-linux-x86_64-cpu</artifactId>
- <version>0.1.1</version>
-</dependency>
-```
-
-If your native environment differs slightly from the assembly package, for example, if you use the openblas package instead of the atlas package, it's better to use the mxnet-core package and put the compiled Java native library in your load path:
-
-```HTML
-<dependency>
- <groupId>ml.dmlc.mxnet</groupId>
- <artifactId>mxnet-core_2.10</artifactId>
- <version>0.1.1</version>
-</dependency>
-```
-
-#### Build the Library from Source Code
-Before you build MXNet for Scala from source code, you must complete [building the shared library](#build-the-shared-library). After you build the shared library, run the following command from the MXNet source root directory to build the MXNet Scala package:
-
-```bash
- make scalapkg
-```
-
-This command creates the JAR files for the assembly, core, and example modules. It also creates the native library in the ```native/{your-architecture}/target directory```, which you can use to cooperate with the core module.
-
-To install the MXNet Scala package into your local Maven repository, run the following command from the MXNet source root directory:
-
-```bash
- make scalainstall
-```
### Install the MXNet Package for Perl
Before you build MXNet for Perl from source code, you must complete [building the shared library](#build-the-shared-library). After you build the shared library, run the following command from the MXNet source root directory to build the MXNet Perl package:
@@ -256,11 +289,17 @@ Before you build MXNet for Perl from source code, you must complete [building th
perl Makefile.PL INSTALL_BASE=${HOME}/perl5
make install
```
+<hr>
-**Note - ** You are more than welcome to contribute easy installation scripts for other operating systems and programming languages, see [community page](http://mxnet.io/community/index.html) for contributors guidelines.
+## Contributions
+
+You are more than welcome to contribute easy installation scripts for other operating systems and programming languages. See the [community contributions page](../community/contribute.html) for further information.
## Next Steps
-* [Tutorials](http://mxnet.io/tutorials/index.html)
-* [How To](http://mxnet.io/faq/index.html)
-* [Architecture](http://mxnet.io/architecture/index.html)
+* [Tutorials](../tutorials/index.html)
+* [How To](../faq/index.html)
+* [Architecture](../architecture/index.html)
+
+
+<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services