blob: 4a63d809204991ff3bfc4018d8e1218b463db6ed [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="Installing MXNet" />
<meta property="og:image" content="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/og-logo.png" />
<meta property="og:image:secure_url" content="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/og-logo.png" />
<meta property="og:description" content="Installing MXNet" />
<title>Installing MXNet &mdash; mxnet documentation</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/mxnet.css" type="text/css">
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/searchtools_custom.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/selectlang.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript"> jQuery(function() { Search.loadIndex("/versions/1.4.1/searchindex.js"); Search.init();}); </script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-96378503-1', 'auto');
ga('send', 'pageview');
</script>
<!-- -->
<!-- <script type="text/javascript" src="../_static/jquery.js"></script> -->
<!-- -->
<!-- <script type="text/javascript" src="../_static/underscore.js"></script> -->
<!-- -->
<!-- <script type="text/javascript" src="../_static/doctools.js"></script> -->
<!-- -->
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> -->
<!-- -->
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="&lt;no title&gt;" href="amazonlinux_setup.html" />
<link rel="prev" title="About Gluon" href="../gluon/index.html" />
<link rel="icon" type="image/png" href="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet-icon.png">
</head>
<body role="document" background="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet-background-compressed.jpeg">
<div class='content-block'><div class="navbar navbar-fixed-top">
<div class="container" id="navContainer">
<div id="header-inner" class="innder">
<h1 id="logo-wrap">
<a href="../" id="logo"><img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet_logo.png"></a>
</h1>
<nav class="nav-bar" id="main-nav">
<a class="main-nav-link" href="/versions/1.4.1/install/index.html">Install</a>
<span id="dropdown-menu-position-anchor">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">Gluon <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu">
<li><a class="main-nav-link" href="/versions/1.4.1/tutorials/gluon/gluon.html">About</a></li>
<li><a class="main-nav-link" href="https://www.d2l.ai/">Dive into Deep Learning</a></li>
<li><a class="main-nav-link" href="https://gluon-cv.mxnet.io">GluonCV Toolkit</a></li>
<li><a class="main-nav-link" href="https://gluon-nlp.mxnet.io/">GluonNLP Toolkit</a></li>
</ul>
</span>
<span id="dropdown-menu-position-anchor">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">API <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu">
<li><a class="main-nav-link" href="/versions/1.4.1/api/python/index.html">Python</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/c++/index.html">C++</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/clojure/index.html">Clojure</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/java/index.html">Java</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/julia/index.html">Julia</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/perl/index.html">Perl</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/r/index.html">R</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/scala/index.html">Scala</a></li>
</ul>
</span>
<span id="dropdown-menu-position-anchor-docs">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">Docs <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu-docs">
<li><a class="main-nav-link" href="/versions/1.4.1/faq/index.html">FAQ</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/tutorials/index.html">Tutorials</a>
<li><a class="main-nav-link" href="https://github.com/apache/incubator-mxnet/tree/1.4.1/example">Examples</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/architecture/index.html">Architecture</a></li>
<li><a class="main-nav-link" href="https://cwiki.apache.org/confluence/display/MXNET/Apache+MXNet+Home">Developer Wiki</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/model_zoo/index.html">Model Zoo</a></li>
<li><a class="main-nav-link" href="https://github.com/onnx/onnx-mxnet">ONNX</a></li>
</li></ul>
</span>
<span id="dropdown-menu-position-anchor-community">
<a aria-expanded="true" aria-haspopup="true" class="main-nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button">Community <span class="caret"></span></a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu-community">
<li><a class="main-nav-link" href="http://discuss.mxnet.io">Forum</a></li>
<li><a class="main-nav-link" href="https://github.com/apache/incubator-mxnet/tree/1.4.1">Github</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/community/contribute.html">Contribute</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/community/ecosystem.html">Ecosystem</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/community/powered_by.html">Powered By</a></li>
</ul>
</span>
<span id="dropdown-menu-position-anchor-version" style="position: relative"><a href="#" class="main-nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">1.4.1<span class="caret"></span></a><ul id="package-dropdown-menu" class="dropdown-menu"><li><a href="/">master</a></li><li><a href="/versions/1.7.0/">1.7.0</a></li><li><a href=/versions/1.6.0/>1.6.0</a></li><li><a href=/versions/1.5.0/>1.5.0</a></li><li><a href=/versions/1.4.1/>1.4.1</a></li><li><a href=/versions/1.3.1/>1.3.1</a></li><li><a href=/versions/1.2.1/>1.2.1</a></li><li><a href=/versions/1.1.0/>1.1.0</a></li><li><a href=/versions/1.0.0/>1.0.0</a></li><li><a href=/versions/0.12.1/>0.12.1</a></li><li><a href=/versions/0.11.0/>0.11.0</a></li></ul></span></nav>
<script> function getRootPath(){ return "../" } </script>
<div class="burgerIcon dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"></a>
<ul class="dropdown-menu" id="burgerMenu">
<li><a href="/versions/1.4.1/install/index.html">Install</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/tutorials/index.html">Tutorials</a></li>
<li class="dropdown-submenu dropdown">
<a aria-expanded="true" aria-haspopup="true" class="dropdown-toggle burger-link" data-toggle="dropdown" href="#" tabindex="-1">Gluon</a>
<ul class="dropdown-menu navbar-menu" id="package-dropdown-menu">
<li><a class="main-nav-link" href="/versions/1.4.1/tutorials/gluon/gluon.html">About</a></li>
<li><a class="main-nav-link" href="http://gluon.mxnet.io">The Straight Dope (Tutorials)</a></li>
<li><a class="main-nav-link" href="https://gluon-cv.mxnet.io">GluonCV Toolkit</a></li>
<li><a class="main-nav-link" href="https://gluon-nlp.mxnet.io/">GluonNLP Toolkit</a></li>
</ul>
</li>
<li class="dropdown-submenu">
<a aria-expanded="true" aria-haspopup="true" class="dropdown-toggle burger-link" data-toggle="dropdown" href="#" tabindex="-1">API</a>
<ul class="dropdown-menu">
<li><a class="main-nav-link" href="/versions/1.4.1/api/python/index.html">Python</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/c++/index.html">C++</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/clojure/index.html">Clojure</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/java/index.html">Java</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/julia/index.html">Julia</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/perl/index.html">Perl</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/r/index.html">R</a></li>
<li><a class="main-nav-link" href="/versions/1.4.1/api/scala/index.html">Scala</a></li>
</ul>
</li>
<li class="dropdown-submenu">
<a aria-expanded="true" aria-haspopup="true" class="dropdown-toggle burger-link" data-toggle="dropdown" href="#" tabindex="-1">Docs</a>
<ul class="dropdown-menu">
<li><a href="/versions/1.4.1/faq/index.html" tabindex="-1">FAQ</a></li>
<li><a href="/versions/1.4.1/tutorials/index.html" tabindex="-1">Tutorials</a></li>
<li><a href="https://github.com/apache/incubator-mxnet/tree/1.4.1/example" tabindex="-1">Examples</a></li>
<li><a href="/versions/1.4.1/architecture/index.html" tabindex="-1">Architecture</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/MXNET/Apache+MXNet+Home" tabindex="-1">Developer Wiki</a></li>
<li><a href="/versions/1.4.1/model_zoo/index.html" tabindex="-1">Gluon Model Zoo</a></li>
<li><a href="https://github.com/onnx/onnx-mxnet" tabindex="-1">ONNX</a></li>
</ul>
</li>
<li class="dropdown-submenu dropdown">
<a aria-haspopup="true" class="dropdown-toggle burger-link" data-toggle="dropdown" href="#" role="button" tabindex="-1">Community</a>
<ul class="dropdown-menu">
<li><a href="http://discuss.mxnet.io" tabindex="-1">Forum</a></li>
<li><a href="https://github.com/apache/incubator-mxnet/tree/1.4.1" tabindex="-1">Github</a></li>
<li><a href="/versions/1.4.1/community/contribute.html" tabindex="-1">Contribute</a></li>
<li><a href="/versions/1.4.1/community/ecosystem.html" tabindex="-1">Ecosystem</a></li>
<li><a href="/versions/1.4.1/community/powered_by.html" tabindex="-1">Powered By</a></li>
</ul>
</li>
<li id="dropdown-menu-position-anchor-version-mobile" class="dropdown-submenu" style="position: relative"><a href="#" tabindex="-1">1.4.1</a><ul class="dropdown-menu"><li><a tabindex="-1" href=/>master</a></li><li><a tabindex="-1" href=/versions/1.6.0/>1.6.0</a></li><li><a tabindex="-1" href=/versions/1.5.0/>1.5.0</a></li><li><a tabindex="-1" href=/versions/1.4.1/>1.4.1</a></li><li><a tabindex="-1" href=/versions/1.3.1/>1.3.1</a></li><li><a tabindex="-1" href=/versions/1.2.1/>1.2.1</a></li><li><a tabindex="-1" href=/versions/1.1.0/>1.1.0</a></li><li><a tabindex="-1" href=/versions/1.0.0/>1.0.0</a></li><li><a tabindex="-1" href=/versions/0.12.1/>0.12.1</a></li><li><a tabindex="-1" href=/versions/0.11.0/>0.11.0</a></li></ul></li></ul>
</div>
<div class="plusIcon dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
<ul id="plusMenu" class="dropdown-menu dropdown-menu-right"></ul>
</div>
<div id="search-input-wrap">
<form class="" role="search" action="../search.html" method="get" autocomplete="off">
<div class="form-group inner-addon left-addon">
<i class="glyphicon glyphicon-search"></i>
<input type="text" name="q" class="form-control" placeholder="Search">
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<div id="search-preview"></div>
</div>
<div id='searchIcon'>
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</div>
<!-- <div id="lang-select-wrap"> -->
<!-- <label id="lang-select-label"> -->
<!-- <\!-- <i class="fa fa-globe"></i> -\-> -->
<!-- <span></span> -->
<!-- </label> -->
<!-- <select id="lang-select"> -->
<!-- <option value="en">Eng</option> -->
<!-- <option value="zh">中文</option> -->
<!-- </select> -->
<!-- </div> -->
<!-- <a id="mobile-nav-toggle">
<span class="mobile-nav-toggle-bar"></span>
<span class="mobile-nav-toggle-bar"></span>
<span class="mobile-nav-toggle-bar"></span>
</a> -->
</div>
</div>
</div>
<script type="text/javascript">
$('body').css('background', 'white');
</script>
<div class="container">
<div class="row">
<div class="sphinxsidebar leftsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../api/index.html">MXNet APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">MXNet Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="../community/index.html">MXNet Community</a></li>
<li class="toctree-l1"><a class="reference internal" href="../faq/index.html">MXNet FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../gluon/index.html">About Gluon</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installing MXNet</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#docker-installation">Docker installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#build">Build</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install">Install</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="#nvidia-jetson-tx-family">Nvidia Jetson TX family</a></li>
<li class="toctree-l1"><a class="reference internal" href="#source-download">Source Download</a></li>
<li class="toctree-l1"><a class="reference internal" href="../model_zoo/index.html">MXNet Model Zoo</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorials/index.html">Tutorials</a></li>
</ul>
</div>
</div>
<div class="content">
<div class="page-tracker"></div>
<!--- Licensed to the Apache Software Foundation (ASF) under one -->
<!--- or more contributor license agreements. See the NOTICE file -->
<!--- distributed with this work for additional information -->
<!--- regarding copyright ownership. The ASF licenses this file -->
<!--- to you under the Apache License, Version 2.0 (the -->
<!--- "License"); you may not use this file except in compliance -->
<!--- with the License. You may obtain a copy of the License at --><!--- http://www.apache.org/licenses/LICENSE-2.0 --><!--- Unless required by applicable law or agreed to in writing, -->
<!--- software distributed under the License is distributed on an -->
<!--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -->
<!--- KIND, either express or implied. See the License for the -->
<!--- specific language governing permissions and limitations -->
<!--- under the License. --><div class="section" id="installing-mxnet">
<span id="installing-mxnet"></span><h1>Installing MXNet<a class="headerlink" href="#installing-mxnet" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<p>Indicate your preferred configuration. Then, follow the customized commands to install MXNet.</p>
<div class="dropdown">
<button class="btn current-version btn-primary dropdown-toggle" type="button" data-toggle="dropdown">v1.3.1
<span class="caret"></span></button>
<ul class="dropdown-menu opt-group">
<li class="opt active versions"><a href="#">v1.3.1</a></li>
<li class="opt versions"><a href="#">v1.2.1</a></li>
<li class="opt versions"><a href="#">v1.1.0</a></li>
<li class="opt versions"><a href="#">v1.0.0</a></li>
<li class="opt versions"><a href="#">v0.12.1</a></li>
<li class="opt versions"><a href="#">v0.11.0</a></li>
<li class="opt versions"><a href="#">master</a></li>
</ul>
</div><script type="text/javascript" src='../_static/js/options.js'></script><!-- START - OS Menu --><div class="btn-group opt-group" role="group">
<button type="button" class="btn btn-default opt active platforms">Linux</button>
<button type="button" class="btn btn-default opt platforms">MacOS</button>
<button type="button" class="btn btn-default opt platforms">Windows</button>
<button type="button" class="btn btn-default opt platforms">Cloud</button>
<button type="button" class="btn btn-default opt platforms">Devices</button>
</div><!-- START - Language Menu --><div class="linux macos windows">
<div class="btn-group opt-group" role="group">
<button type="button" class="btn btn-default opt active languages">Python</button>
<button type="button" class="btn btn-default opt languages">Scala</button>
<button type="button" class="btn btn-default opt languages">Java</button>
<button type="button" class="btn btn-default opt languages">Clojure</button>
<button type="button" class="btn btn-default opt languages">R</button>
<button type="button" class="btn btn-default opt languages">Julia</button>
<button type="button" class="btn btn-default opt languages">Perl</button>
<button type="button" class="btn btn-default opt languages">Cpp</button>
</div>
</div><!-- No CPU GPU for other Devices -->
<div class="linux macos windows cloud">
<div class="btn-group opt-group" role="group">
<button type="button" class="btn btn-default processors opt active">CPU</button>
<button type="button" class="btn btn-default processors opt">GPU</button>
</div>
</div><!-- other devices -->
<div class="devices">
<div class="btn-group opt-group" role="group">
<button type="button" class="btn btn-default iots opt active">Raspberry Pi</button>
<button type="button" class="btn btn-default iots opt">NVIDIA Jetson</button>
</div>
</div><!-- Linux Python GPU Options --><div class="linux macos windows">
<div class="python">
<div class="cpu gpu">
<div class="btn-group opt-group" role="group">
<button type="button" class="btn btn-default environs opt active">Pip</button>
<button type="button" class="btn btn-default environs opt">Docker</button>
<button type="button" class="btn btn-default environs opt">Build from Source</button>
</div>
</div>
</div>
</div>
<hr>
<!-- END - Main Menu --><!-- START - Linux Python CPU Installation Instructions --><div class="linux">
<div class="python">
<div class="cpu">
<div class="pip">
<div class="v1-3-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet
</pre></div>
</div>
</div> <!-- End of v1-3-1 -->
<div class="v1-2-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.2.1
</pre></div>
</div>
</div> <!-- End of v1-2-1 --><div class="v1-1-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.1.0
</pre></div>
</div>
</div> <!-- End of v1-1-0--><div class="v1-0-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.0.0
</pre></div>
</div>
</div> <!-- End of v1-0-0--><div class="v0-12-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==0.12.1
</pre></div>
</div>
<p>For MXNet 0.12.0:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==0.12.0
</pre></div>
</div>
</div> <!-- End of v0-12-1--><div class="v0-11-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==0.11.0
</pre></div>
</div>
</div> <!-- End of v0-11-0--><div class="master"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet --pre
</pre></div>
</div>
</div> <!-- End of master-->
<hr> <!-- pip footer -->
MXNet offers MKL pip packages that will be much faster when running on Intel hardware.
Check the chart below for other options, 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>.<p><img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/install/pip-packages.png" alt="pip packages"/></p>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu92mkl</em> means the package is built with CUDA/cuDNN and MKL-DNN enabled and the CUDA version is 9.2.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
</div> <!-- End of pip --><div class="docker">
<br/><p>Docker images with <em>MXNet</em> are available at <a class="reference external" href="https://hub.docker.com/r/mxnet/">Docker Hub</a>.</p>
<p><strong>Step 1</strong> Install Docker on your machine by following the <a class="reference external" href="https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository">docker installation instructions</a>.</p>
<p><em>Note</em> - You can install Community Edition (CE) to get started with <em>MXNet</em>.</p>
<p><strong>Step 2</strong> [Optional] Post installation steps to manage Docker as a non-root user.</p>
<p>Follow the four steps in this <a class="reference external" href="https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user">docker documentation</a> to allow managing docker containers without <em>sudo</em>.</p>
<p>If you skip this step, you need to use <em>sudo</em> each time you invoke Docker.</p>
<p><strong>Step 3</strong> Pull the MXNet docker image.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python # Use sudo if you skip Step 2
</pre></div>
</div>
<p>You can list docker images to see if mxnet/python docker image pull was successful.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ 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
</pre></div>
</div>
<p>Using the latest MXNet with <a class="reference external" href="https://github.com/intel/mkl-dnn">Intel MKL-DNN</a> is recommended for the fastest inference speeds with MXNet.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python:1.3.0_cpu_mkl # Use sudo if you skip Step 2
$ docker images # Use sudo if you skip Step 2
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python 1.3.0_cpu_mkl deaf9bf61d29 4 days ago 678 MB
</pre></div>
</div>
<p><strong>Step 4</strong> <a href="validate_mxnet.html">Validate the installation</a>.</p>
</div> <!-- END of docker --><div class="build-from-source">
<br/><p>To build from source, refer to the <a href="ubuntu_setup.html">MXNet Ubuntu installation guide</a>.</p>
</div><!-- END of build from source --></div><!-- END of CPU -->
<!-- END - Linux Python CPU Installation Instructions --><!-- START - Linux Python GPU Installation Instructions --><div class="gpu">
<div class="pip">
<div class="v1-3-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu92
</pre></div>
</div>
</div> <!-- End of v1-3-1-->
<div class="v1-2-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu92==1.2.1
</pre></div>
</div>
</div> <!-- End of v1-2-1--><div class="v1-1-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu91==1.1.0
</pre></div>
</div>
</div> <!-- End of v1-1-0--><div class="v1-0-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu90==1.0.0
</pre></div>
</div>
</div> <!-- End of v1-0-0--><div class="v0-12-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu90==0.12.1
</pre></div>
</div>
</div> <!-- End of v0-12-1--><div class="v0-11-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu80==0.11.0
</pre></div>
</div>
</div> <!-- End of v0-11-0--><div class="master"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu92 --pre
</pre></div>
</div>
</div> <!-- End of master-->
<hr> <!-- pip footer -->
MXNet offers MKL pip packages that will be much faster when running on Intel hardware.
Check the chart below for other options, 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>.<p><img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/install/pip-packages.png" alt="pip packages"/></p>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu92mkl</em> means the package is built with CUDA/cuDNN and MKL-DNN enabled and the CUDA version is 9.2.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
<p>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>.</p>
<p><strong>Important:</strong> Make sure your installed CUDA version matches the CUDA version in the pip package. Check your CUDA version with the following command:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nvcc</span> <span class="o">--</span><span class="n">version</span>
</pre></div>
</div>
<p>You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version.</p>
</div> <!-- END of pip --><div class="docker"><p><br/></p>
<p>Docker images with <em>MXNet</em> are available at <a class="reference external" href="https://hub.docker.com/r/mxnet/">Docker Hub</a>.</p>
<p><strong>Step 1</strong> Install Docker on your machine by following the <a class="reference external" href="https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository">docker installation instructions</a>.</p>
<p><em>Note</em> - You can install Community Edition (CE) to get started with <em>MXNet</em>.</p>
<p><strong>Step 2</strong> [Optional] Post installation steps to manage Docker as a non-root user.</p>
<p>Follow the four steps in this <a class="reference external" href="https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user">docker documentation</a> to allow managing docker containers without <em>sudo</em>.</p>
<p>If you skip this step, you need to use <em>sudo</em> each time you invoke Docker.</p>
<p><strong>Step 3</strong> Install <em>nvidia-docker-plugin</em> following the <a class="reference external" href="https://github.com/NVIDIA/nvidia-docker/wiki">installation instructions</a>. <em>nvidia-docker-plugin</em> is required to enable the usage of GPUs from the docker containers.</p>
<p><strong>Step 4</strong> Pull the MXNet docker image.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python:gpu # Use sudo if you skip Step 2
</pre></div>
</div>
<p>You can list docker images to see if mxnet/python docker image pull was successful.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker images # Use sudo if you skip Step 2
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python gpu 493b2683c269 3 weeks ago 4.77 GB
</pre></div>
</div>
<p>Using the latest MXNet with <a class="reference external" href="https://github.com/intel/mkl-dnn">Intel MKL-DNN</a> is recommended for the fastest inference speeds with MXNet.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python:1.3.0_cpu_mkl # Use sudo if you skip Step 2
$ docker images # Use sudo if you skip Step 2
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python 1.3.0_gpu_cu92_mkl adcb3ab19f50 4 days ago 4.23 GB
</pre></div>
</div>
<p><strong>Step 5</strong> <a href="validate_mxnet.html">Validate the installation</a>.</p>
</div> <!-- END of docker --><div class="build-from-source">
<br/>
Refer to the <a href="ubuntu_setup.html">MXNet Ubuntu installation guide</a>.</div> <!-- END of build from source -->
</div> <!-- END of GPU -->
</div> <!-- END of Python -->
<!-- END - Linux Python GPU Installation Instructions --><div class="r">
<div class="cpu"><p>The default version of R that is installed with <code class="docutils literal"><span class="pre">apt-get</span></code> is insufficient. You will need to first <a class="reference external" href="/versions/1.4.1/install/ubuntu_setup.html#install-the-mxnet-package-for-r">install R v3.4.4+ and build MXNet from source</a>.</p>
<p>After you have setup R v3.4.4+ and MXNet, you can build and install the MXNet R bindings with the following, assuming that <code class="docutils literal"><span class="pre">incubator-mxnet</span></code> is the source directory you used to build MXNet as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ cd incubator-mxnet
$ make rpkg
</pre></div>
</div>
</div> <!-- END of CPU --><div class="gpu"><p>The default version of R that is installed with <code class="docutils literal"><span class="pre">apt-get</span></code> is insufficient. You will need to first <a class="reference external" href="/versions/1.4.1/install/ubuntu_setup.html#install-the-mxnet-package-for-r">install R v3.4.4+ and build MXNet from source</a>.</p>
<p>After you have setup R v3.4.4+ and MXNet, you can build and install the MXNet R bindings with the following, assuming that <code class="docutils literal"><span class="pre">incubator-mxnet</span></code> is the source directory you used to build MXNet as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ cd incubator-mxnet
$ make rpkg
</pre></div>
</div>
</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.<p><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></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>mxnet-full_2.11-linux-x86_64-gpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of gpu --><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.<p><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></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>mxnet-full_2.11-linux-x86_64-cpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of cpu -->
</div> <!-- End of scala --><div class="clojure">
<div class="gpu">
<br/><p>You can use the Maven packages defined in the following dependency to include MXNet in your Clojure project. To maximize leverage, the Clojure package has been built on the existing Scala package. 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 that is required to use the Clojure dependency.</p>
<p><a href="https://mvnrepository.com/artifact/org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-gpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux gpu-green.svg" alt="maven badge"/></a></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet.contrib.clojure<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>clojure-mxnet-linux-gpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of gpu -->
<div class="cpu">
<br/>
You can use the Maven packages defined in the following dependency to include MXNet in your Clojure project. To maximize leverage, the Clojure package has been built on the existing Scala package. 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 that is required to use the Clojure dependency.<p><a href="https://mvnrepository.com/artifact/org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge"/></a></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet.contrib.clojure<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>clojure-mxnet-linux-cpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of cpu -->
</div> <!-- End of clojure --><div class="java">
<div class="gpu">
<br/>
You can use the Maven packages defined in the following dependency to include MXNet in your Java project. The Java API is provided as a subset of the Scala API and is intended for inference only. Please refer to the <a href="java_setup.html">MXNet-Java setup guide</a> for a detailed set of instructions to help you with the setup process.<p><a href="https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.3.1-SNAPSHOT~~"><img src="https://img.shields.io/badge/org.apache.mxnet-linux gpu-green.svg" alt="maven badge"/></a></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>mxnet-full_2.11-linux-x86_64-gpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">scope</span><span class="p">&gt;</span>system<span class="p">&lt;/</span><span class="nt">scope</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">version</span><span class="p">&gt;</span>1.3.1<span class="p">&lt;/</span><span class="nt">version</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">systemPath</span><span class="p">&gt;</span>/system/path/to/jar/mxnet-full_2.11-linux-x86_64-gpu-1.3.1-SNAPSHOT.jar<span class="p">&lt;/</span><span class="nt">systemPath</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of gpu --><div class="cpu">
<br/>
You can use the Maven packages defined in the following dependency to include MXNet in your Java project. The Java API is provided as a subset of the Scala API and is intended for inference only. Please refer to the <a href="java_setup.html">MXNet-Java setup guide</a> for a detailed set of instructions to help you with the setup process.<p><a href="https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.3.1-SNAPSHOT~~"><img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge"/></a></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>mxnet-full_2.11-linux-x86_64-cpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">scope</span><span class="p">&gt;</span>system<span class="p">&lt;/</span><span class="nt">scope</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">version</span><span class="p">&gt;</span>1.3.1<span class="p">&lt;/</span><span class="nt">version</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">systemPath</span><span class="p">&gt;</span>/system/path/to/jar/mxnet-full_2.11-linux-x86_64-cpu-1.3.1-SNAPSHOT.jar<span class="p">&lt;/</span><span class="nt">systemPath</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of cpu -->
</div> <!-- End of java --><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>.</div> <!-- End of cpu gpu -->
</div> <!-- End of julia --><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>.</div> <!-- End of cpu gpu -->
</div> <!-- End of julia --><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></div> <!-- END - Linux --><!-- START - MacOS Python CPU Installation Instructions --><div class="macos">
<div class="python">
<div class="cpu">
<div class="pip">
<div class="v1-3-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet
</pre></div>
</div>
</div> <!-- End of v1-3-1 -->
<div class="v1-2-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.2.1
</pre></div>
</div>
</div> <!-- End of v1-2-1 --><div class="v1-1-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.1.0
</pre></div>
</div>
</div> <!-- End of v1-1-0--><div class="v1-0-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.0.0
</pre></div>
</div>
</div> <!-- End of v1-0-0--><div class="v0-12-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet=0.12.1
</pre></div>
</div>
</div> <!-- End of v0-12-1--><div class="v0-11-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==0.11.0
</pre></div>
</div>
</div> <!-- End of v0-11-0--><div class="master"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet --pre
</pre></div>
</div>
</div> <!-- End of master-->
<hr> <!-- pip footer -->
MXNet offers MKL pip packages that will be much faster when running on Intel hardware.
Check the chart below for other options, 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>.<p><img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/install/pip-packages.png" alt="pip packages"/></p>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu92mkl</em> means the package is built with CUDA/cuDNN and MKL-DNN enabled and the CUDA version is 9.2.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
</div> <!-- END of pip --><div class="docker">
<br/><p>Docker images with <em>MXNet</em> are available at <a class="reference external" href="https://hub.docker.com/r/mxnet/">Docker Hub</a>.</p>
<p><strong>Step 1</strong> Install Docker on your machine by following the <a class="reference external" href="https://docs.docker.com/docker-for-mac/install/#install-and-run-docker-for-mac">docker installation instructions</a>.</p>
<p><em>Note</em> - You can install Community Edition (CE) to get started with <em>MXNet</em>.</p>
<p><strong>Step 2</strong> Pull the MXNet docker image.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python
</pre></div>
</div>
<p>You can list docker images to see if mxnet/python docker image pull was successful.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python latest 00d026968b3c 3 weeks ago 1.41 GB
</pre></div>
</div>
<p>Using the latest MXNet with <a class="reference external" href="https://github.com/intel/mkl-dnn">Intel MKL-DNN</a> is recommended for the fastest inference speeds with MXNet.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python:1.3.0_cpu_mkl # Use sudo if you skip Step 2
$ docker images # Use sudo if you skip Step 2
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python 1.3.0_cpu_mkl deaf9bf61d29 4 days ago 678 MB
</pre></div>
</div>
<p><strong>Step 4</strong> <a href="validate_mxnet.html">Validate the installation</a>.</p>
</div> <!-- END of docker --><div class="build-from-source">
<br/><p>To build from source, refer to the <a href="osx_setup.html">MXNet macOS installation guide</a>.</p>
<p>MXNet developers should refer to the MXNet wiki&#8217;s <a href="https://cwiki.apache.org/confluence/display/MXNET/MXNet+Developer+Setup+on+Mac">Developer Setup on Mac</a>.
<br/></p>
</div> <!-- END of build from source -->
</div> <!-- END of CPU --><!-- 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><div class="build-from-source">
<br/><p>Refer to the <a href="osx_setup.html">MXNet macOS installation guide</a>.</p>
<p>MXNet developers should refer to the MXNet wiki&#8217;s <a href="https://cwiki.apache.org/confluence/display/MXNET/MXNet+Developer+Setup+on+Mac">Developer Setup on Mac</a>.
<br/></p>
</div> <!-- END of build from source -->
</div> <!-- END of GPU -->
</div> <!-- END of Python --><!-- START - MacOS R CPU Installation Instructions --><div class="r">
<div class="cpu">
</br><p>To run MXNet you also should have OpenCV and OpenBLAS installed. You may install them with <code class="docutils literal"><span class="pre">brew</span></code> as follows:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>brew install opencv
brew install openblas@0.3.1
</pre></div>
</div>
<p>Add a soft link to the OpenBLAS installation. This example links the 0.3.1 version:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>ln -sf /usr/local/opt/openblas/lib/libopenblasp-r0.3.* /usr/local/opt/openblas/lib/libopenblasp-r0.3.1.dylib
</pre></div>
</div>
<p>Install the latest version (3.5.1+) of R from <a class="reference external" href="https://cran.r-project.org/bin/macosx/">CRAN</a>.
You can <a class="reference external" href="/versions/1.4.1/install/osx_setup.html#install-the-mxnet-package-for-r">build MXNet-R from source</a>, or you can use a pre-built binary:</p>
<div class="highlight-r"><div class="highlight"><pre><span></span><span class="n">cran</span> <span class="o">&lt;-</span> <span class="nf">getOption</span><span class="p">(</span><span class="s">&quot;repos&quot;</span><span class="p">)</span>
<span class="n">cran[</span><span class="s">&quot;dmlc&quot;</span><span class="n">]</span> <span class="o">&lt;-</span> <span class="s">&quot;https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/&quot;</span>
<span class="nf">options</span><span class="p">(</span><span class="n">repos</span> <span class="o">=</span> <span class="n">cran</span><span class="p">)</span>
<span class="nf">install.packages</span><span class="p">(</span><span class="s">&quot;mxnet&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div> <!-- END of CPU --><div class="gpu">
</br>
Will be available soon.</div> <!-- END of GPU -->
</div> <!-- END of R --><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.<p><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></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>mxnet-full_2.11-osx-x86_64-cpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of cpu -->
<div class="gpu"><p>Not available at this time. <br></p>
</div>
</div> <!-- End of scala --><div class="clojure">
<div class="cpu">
</br>
You can use the Maven packages defined in the following dependency to include MXNet in your Clojure project. To maximize leverage, the Clojure package has been built on the existing Scala package. 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 that is required to use the Clojure dependency.<p><a href="https://mvnrepository.com/artifact/org.apache.mxnet.contrib.clojure/clojure-mxnet-osx-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-mac cpu-green.svg" alt="maven badge"/></a></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet.contrib.clojure<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>clojure-mxnet-osx-cpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of cpu -->
<div class="gpu">
Not available at this time. <br>
</div> <!-- End of gpu -->
</div> <!-- End of clojure --><div class="java">
<div class="cpu">
</br>
You can use the Maven packages defined in the following dependency to include MXNet in your Java project. The Java API is provided as a subset of the Scala API and is intended for inference only. Please refer to the <a href="java_setup.html">MXNet-Java setup guide</a> for a detailed set of instructions to help you with the setup process.<p><a href="https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.3.1-SNAPSHOT~~"><img src="https://img.shields.io/badge/org.apache.mxnet-mac cpu-green.svg" alt="maven badge"/></a></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>mxnet-full_2.11-osx-x86_64-cpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">scope</span><span class="p">&gt;</span>system<span class="p">&lt;/</span><span class="nt">scope</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">version</span><span class="p">&gt;</span>1.3.1<span class="p">&lt;/</span><span class="nt">version</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">systemPath</span><span class="p">&gt;</span>/system/path/to/jar/mxnet-full_2.11-osx-x86_64-cpu-1.3.1-SNAPSHOT.jar<span class="p">&lt;/</span><span class="nt">systemPath</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of cpu -->
<div class="gpu"><p>Not available at this time. <br></p>
</div>
</div> <!-- End of java --><div class="clojure">
<div class="cpu">
</br>
You can use the Maven packages defined in the following `dependency` to include MXNet in your Clojure project. To maximize leverage, the Clojure package has been built on the existing Scala package. 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 that is required to use the Clojure dependency.<p><a href="https://mvnrepository.com/artifact/org.apache.mxnet.contrib.clojure/clojure-mxnet-osx-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-mac cpu-green.svg" alt="maven badge"/></a></p>
<div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">dependency</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">groupId</span><span class="p">&gt;</span>org.apache.mxnet.contrib.clojure<span class="p">&lt;/</span><span class="nt">groupId</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">artifactId</span><span class="p">&gt;</span>clojure-mxnet-osx-cpu<span class="p">&lt;/</span><span class="nt">artifactId</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dependency</span><span class="p">&gt;</span>
</pre></div>
</div>
<p><br></p>
</div> <!-- End of cpu -->
<div class="gpu"><p>Not available at this time. <br></p>
</div> <!-- End of gpu -->
</div> <!-- End of clojure --><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>.</div> <!-- End of cpu gpu -->
</div> <!-- End of julia --><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>.</div> <!-- End of cpu gpu -->
</div> <!-- End of julia --><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="windows">
<div class="python">
<div class="cpu">
<div class="pip">
<div class="v1-3-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet
</pre></div>
</div>
</div> <!-- End of v1-3-1 -->
<div class="v1-2-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.2.1
</pre></div>
</div>
</div> <!-- End of v1-2-1 --><div class="v1-1-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.1.0
</pre></div>
</div>
</div> <!-- End of v1-1-0--><div class="v1-0-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==1.0.0
</pre></div>
</div>
</div> <!-- End of v1-0-0--><div class="v0-12-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==0.12.1
</pre></div>
</div>
</div> <!-- End of v0-12-1--><div class="v0-11-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet==0.11.0
</pre></div>
</div>
</div> <!-- End of v0-11-0--><div class="master"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet --pre
</pre></div>
</div>
</div> <!-- End of master-->
<hr> <!-- pip footer -->
MXNet offers MKL pip packages that will be much faster when running on Intel hardware.
Check the chart below for other options, 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>.<p><img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/install/pip-packages.png" alt="pip packages"/></p>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu92mkl</em> means the package is built with CUDA/cuDNN and MKL-DNN enabled and the CUDA version is 9.2.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
</div> <!-- End of pip --><div class="docker">
<br/><p>Docker images with <em>MXNet</em> are available at <a class="reference external" href="https://hub.docker.com/r/mxnet/">Docker Hub</a>.</p>
<p><strong>Step 1</strong> Install Docker on your machine by following the <a class="reference external" href="https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository">docker installation instructions</a>.</p>
<p><em>Note</em> - You can install Community Edition (CE) to get started with <em>MXNet</em>.</p>
<p><strong>Step 2</strong> [Optional] Post installation steps to manage Docker as a non-root user.</p>
<p>Follow the four steps in this <a class="reference external" href="https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user">docker documentation</a> to allow managing docker containers without <em>sudo</em>.</p>
<p>If you skip this step, you need to use <em>sudo</em> each time you invoke Docker.</p>
<p><strong>Step 3</strong> Pull the MXNet docker image.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python # Use sudo if you skip Step 2
</pre></div>
</div>
<p>You can list docker images to see if mxnet/python docker image pull was successful.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ 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
</pre></div>
</div>
<p>Using the latest MXNet with <a class="reference external" href="https://github.com/intel/mkl-dnn">Intel MKL-DNN</a> is recommended for the fastest inference speeds with MXNet.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ docker pull mxnet/python:1.3.0_cpu_mkl # Use sudo if you skip Step 2
$ docker images # Use sudo if you skip Step 2
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python 1.3.0_cpu_mkl deaf9bf61d29 4 days ago 678 MB
</pre></div>
</div>
<p><strong>Step 4</strong> <a href="validate_mxnet.html">Validate the installation</a>.</p>
</div> <!-- End of docker --><div class="build-from-source">
<br/>
Refer to the <a href="windows_setup.html">MXNet Windows installation guide</a></div> <!-- End of Build from source -->
</div> <!-- End of CPU --><div class="gpu">
<div class="pip">
<div class="v1-3-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu92
</pre></div>
</div>
</div> <!-- End of v1-3-1 -->
<div class="v1-2-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu92==1.2.1
</pre></div>
</div>
</div> <!-- End of v1-2-1 --><div class="v1-1-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu91==1.1.0
</pre></div>
</div>
</div> <!-- End of v1-1-0--><div class="v1-0-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu90==1.0.0
</pre></div>
</div>
</div> <!-- End of v1-0-0--><div class="v0-12-1"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu90==0.12.1
</pre></div>
</div>
</div> <!-- End of v0-12-1--><div class="v0-11-0"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu80==0.11.0
</pre></div>
</div>
</div> <!-- End of v0-11-0--><div class="master"><div class="highlight-default"><div class="highlight"><pre><span></span>$ pip install mxnet-cu92 --pre
</pre></div>
</div>
</div> <!-- End of master-->
<hr> <!-- pip footer -->
MXNet offers MKL pip packages that will be much faster when running on Intel hardware.
Check the chart below for other options, 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>.<p><img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/install/pip-packages.png" alt="pip packages"/></p>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu92mkl</em> means the package is built with CUDA/cuDNN and MKL-DNN enabled and the CUDA version is 9.2.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
<p><a class="reference external" href="https://www.anaconda.com/download/">Anaconda</a> is recommended.</p>
<p>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>.</p>
<p><strong>Important:</strong> Make sure your installed CUDA version matches the CUDA version in the pip package. Check your CUDA version with the following command:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nvcc</span> <span class="o">--</span><span class="n">version</span>
</pre></div>
</div>
<p>Refer to <a class="reference external" href="https://github.com/apache/incubator-mxnet/issues/8671">#8671</a> for status on CUDA 9.1 support.</p>
<p>You can either upgrade your CUDA install or install the MXNet package that supports your CUDA version.</p>
</div> <!-- End of pip --><div class="build-from-source">
<br/><p>To build from source, refer to the <a href="windows_setup.html">MXNet Windows installation guide</a>.</p>
</div> <!-- End of build from source -->
</div> <!-- End of GPU -->
</div> <!-- End of Python --><!-- START - Windows R CPU Installation Instructions --><div class="r">
<div class="cpu">
</br><p>Install the latest version (3.5.1+) of R from <a class="reference external" href="https://cran.r-project.org/bin/windows/">CRAN</a>.
You can <a class="reference external" href="/versions/1.4.1/install/windows_setup.html#install-mxnet-package-for-r">build MXNet-R from source</a>, or you can use a pre-built binary:</p>
<div class="highlight-r"><div class="highlight"><pre><span></span><span class="n">cran</span> <span class="o">&lt;-</span> <span class="nf">getOption</span><span class="p">(</span><span class="s">&quot;repos&quot;</span><span class="p">)</span>
<span class="n">cran[</span><span class="s">&quot;dmlc&quot;</span><span class="n">]</span> <span class="o">&lt;-</span> <span class="s">&quot;https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/&quot;</span>
<span class="nf">options</span><span class="p">(</span><span class="n">repos</span> <span class="o">=</span> <span class="n">cran</span><span class="p">)</span>
<span class="nf">install.packages</span><span class="p">(</span><span class="s">&quot;mxnet&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>To run MXNet you also should have OpenCV and OpenBLAS installed.</p>
</div> <!-- END - Windows R CPU --><div class="gpu">
</br><p>You can <a class="reference external" href="/versions/1.4.1/install/windows_setup.html#install-mxnet-package-for-r">build MXNet-R from source</a>, or you can use a pre-built binary:</p>
<div class="highlight-r"><div class="highlight"><pre><span></span> <span class="n">cran</span> <span class="o">&lt;-</span> <span class="nf">getOption</span><span class="p">(</span><span class="s">&quot;repos&quot;</span><span class="p">)</span>
<span class="n">cran[</span><span class="s">&quot;dmlc&quot;</span><span class="n">]</span> <span class="o">&lt;-</span> <span class="s">&quot;https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/GPU/cu92&quot;</span>
<span class="nf">options</span><span class="p">(</span><span class="n">repos</span> <span class="o">=</span> <span class="n">cran</span><span class="p">)</span>
<span class="nf">install.packages</span><span class="p">(</span><span class="s">&quot;mxnet&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>Change cu92 to cu80, cu90 or cu91 based on your CUDA toolkit version. Currently, MXNet supports these versions of CUDA.</p>
</div> <!-- END of GPU -->
</div> <!-- END - Windows R --><div class="scala">
<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="clojure">
<div class="cpu gpu">
<br/>
MXNet-Clojure for Windows is not yet available.
<br/>
</div> <!-- End of cpu gpu -->
</div> <!-- End of clojure --><div class="java">
<div class="cpu gpu">
<br/>
MXNet-Java for Windows is not yet available.
<br/>
</div> <!-- End of cpu gpu -->
</div> <!-- End of java --><div class="julia">
<div class="cpu gpu">
</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 --><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">
</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 of C++ -->
<hr>
For more installation options, refer to the <a href="windows_setup.html">MXNet Windows installation guide</a>.
</div> <!-- End of Windows --><!-- START - Cloud Python Installation Instructions --><div class="cloud"><p>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 <a class="reference external" href="http://docs.aws.amazon.com/dlami/latest/devguide/what-is-dlami.html">AWS Deep Learning AMI Developer Guide</a>.</p>
<p>You can also run distributed deep learning with <em>MXNet</em> on AWS using <a class="reference external" href="https://github.com/awslabs/deeplearning-cfn/blob/master/README.md">Cloudformation Template</a>.</p>
</div> <!-- END - Cloud Python Installation Instructions --><!-- DEVICES -->
<div class="devices">
<div class="raspberry-pi"><p>MXNet supports the Debian based Raspbian ARM based operating system so you can run MXNet on Raspberry Pi Devices.</p>
<p>These instructions will walk through how to build MXNet for the Raspberry Pi and install the Python bindings for the library.</p>
<p>You can do a dockerized cross compilation build on your local machine or a native build on-device.</p>
<p>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.</p>
<p><strong>Cross compilation build (Experimental)</strong></p>
<div class="section" id="docker-installation">
<span id="docker-installation"></span><h2>Docker installation<a class="headerlink" href="#docker-installation" title="Permalink to this headline"></a></h2>
<p><strong>Step 1</strong> Install Docker on your machine by following the <a class="reference external" href="https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository">docker installation instructions</a>.</p>
<p><em>Note</em> - You can install Community Edition (CE)</p>
<p><strong>Step 2</strong> [Optional] Post installation steps to manage Docker as a non-root user.</p>
<p>Follow the four steps in this <a class="reference external" href="https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user">docker documentation</a> to allow managing docker containers without <em>sudo</em>.</p>
</div>
<div class="section" id="build">
<span id="build"></span><h2>Build<a class="headerlink" href="#build" title="Permalink to this headline"></a></h2>
<p><strong>Please use a Native build with gcc 4 as explained below, higher compiler versions currently cause test
failures on ARM</strong></p>
<p>The following command will build a container with dependencies and tools and then compile MXNet for
ARMv7. The resulting artifact will be located in <code class="docutils literal"><span class="pre">build/mxnet-x.x.x-py2.py3-none-any.whl</span></code>, copy this
file to your Raspberry Pi.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">ci</span><span class="o">/</span><span class="n">build</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="n">armv7</span>
</pre></div>
</div>
</div>
<div class="section" id="install">
<span id="install"></span><h2>Install<a class="headerlink" href="#install" title="Permalink to this headline"></a></h2>
<p>Create a virtualenv and install the package we created previously.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>virtualenv -p `which python3` mxnet_py3
source mxnet_py3/bin/activate
pip install mxnet-x.x.x-py2.py3-none-any.whl
</pre></div>
</div>
<p><strong>Native Build</strong></p>
<p>Installing MXNet is a two-step process:</p>
<ol class="simple">
<li>Build the shared library from the MXNet C++ source code.</li>
<li>Install the supported language-specific packages for MXNet.</li>
</ol>
<p><strong>Step 1</strong> Build the Shared Library</p>
<p>On Raspbian versions Wheezy and later, you need the following dependencies:</p>
<ul class="simple">
<li>Git (to pull code from GitHub)</li>
<li>libblas (for linear algebraic operations)</li>
<li>libopencv (for computer vision operations. This is optional if you want to save RAM and Disk Space)</li>
<li>A C++ compiler that supports C++ 11. The C++ compiler compiles and builds MXNet source code. Supported compilers include the following:<ul>
<li><a class="reference external" href="https://gcc.gnu.org/gcc-4.8/">G++ (4.8 or later)</a>. Make sure to use gcc 4 and not 5 or 6 as there are known bugs with these compilers.</li>
<li><a class="reference external" href="https://clang.llvm.org/">Clang (3.9 - 6)</a></li>
</ul>
</li>
</ul>
<p>Install these dependencies using the following commands in any directory:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>
<span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">git</span> <span class="n">cmake</span> <span class="n">ninja</span><span class="o">-</span><span class="n">build</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">g</span><span class="o">++-</span><span class="mf">4.9</span> <span class="n">c</span><span class="o">++-</span><span class="mf">4.9</span> <span class="n">liblapack</span><span class="o">*</span> <span class="n">libblas</span><span class="o">*</span> <span class="n">libopencv</span><span class="o">*</span> <span class="n">libopenblas</span><span class="o">*</span> <span class="n">python3</span><span class="o">-</span><span class="n">dev</span> <span class="n">virtualenv</span>
</pre></div>
</div>
<p>Clone the MXNet source code repository using the following <code class="docutils literal"><span class="pre">git</span></code> command in your home directory:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">apache</span><span class="o">/</span><span class="n">incubator</span><span class="o">-</span><span class="n">mxnet</span><span class="o">.</span><span class="n">git</span> <span class="o">--</span><span class="n">recursive</span>
<span class="n">cd</span> <span class="n">incubator</span><span class="o">-</span><span class="n">mxnet</span>
</pre></div>
</div>
<p>Build:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> mkdir -p build &amp;&amp; cd build
cmake \
-DUSE_SSE=OFF \
-DUSE_CUDA=OFF \
-DUSE_OPENCV=ON \
-DUSE_OPENMP=ON \
-DUSE_MKL_IF_AVAILABLE=OFF \
-DUSE_SIGNAL_HANDLER=ON \
-DCMAKE_BUILD_TYPE=Release \
-GNinja ..
ninja -j$(nproc)
</pre></div>
</div>
<p>Some compilation units require memory close to 1GB, so it&#8217;s recommended that you enable swap as
explained below and be cautious about increasing the number of jobs when building (-j)</p>
<p>Executing these commands start the build process, which can take up to a couple hours, and creates a file called <code class="docutils literal"><span class="pre">libmxnet.so</span></code> in the build directory.</p>
<p>If you are getting build errors in which the compiler is being killed, it is likely that the
compiler is running out of memory (especially if you are on Raspberry Pi 1, 2 or Zero, which have
less than 1GB of RAM), this can often be rectified by increasing the swapfile size on the Pi by
editing the file /etc/dphys-swapfile and changing the line CONF_SWAPSIZE=100 to CONF_SWAPSIZE=1024,
then running:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">dphys</span><span class="o">-</span><span class="n">swapfile</span> <span class="n">stop</span>
<span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">dphys</span><span class="o">-</span><span class="n">swapfile</span> <span class="n">start</span>
<span class="n">free</span> <span class="o">-</span><span class="n">m</span> <span class="c1"># to verify the swapfile size has been increased</span>
</pre></div>
</div>
<p><strong>Step 2</strong> Install MXNet Python Bindings</p>
<p>To install Python bindings run the following commands in the MXNet directory:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">cd</span> <span class="n">python</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">pip</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">e</span> <span class="o">.</span>
</pre></div>
</div>
<p>Note that the <code class="docutils literal"><span class="pre">-e</span></code> flag is optional. It is equivalent to <code class="docutils literal"><span class="pre">--editable</span></code> and means that if you edit the source files, these changes will be reflected in the package installed.</p>
<p>Alternatively you can create a whl package installable with pip with the following command:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>ci/docker/runtime_functions.sh build_wheel python/ $(realpath build)
</pre></div>
</div>
<p>You are now ready to run MXNet on your Raspberry Pi device. You can get started by following the tutorial on <a class="reference external" href="/versions/1.4.1/tutorials/embedded/wine_detector.html">Real-time Object Detection with MXNet On The Raspberry Pi</a>.</p>
<p><em>Note - Because the complete MXNet library takes up a significant amount of the Raspberry Pi&#8217;s limited RAM, when loading training data or large models into memory, you might have to turn off the GUI and terminate running processes to free RAM.</em></p>
</div> <!-- End of raspberry pi --><div class="nvidia-jetson"></div>
</div>
<div class="section" id="nvidia-jetson-tx-family">
<span id="nvidia-jetson-tx-family"></span><h1>Nvidia Jetson TX family<a class="headerlink" href="#nvidia-jetson-tx-family" title="Permalink to this headline"></a></h1>
<p>MXNet supports the Ubuntu Arch64 based operating system so you can run MXNet on NVIDIA Jetson Devices.</p>
<p>These instructions will walk through how to build MXNet for the Pascal based <a class="reference external" href="http://www.nvidia.com/object/embedded-systems-dev-kits-modules.html">NVIDIA Jetson TX2</a> and install the corresponding python language bindings.</p>
<p>For the purposes of this install guide we will assume that CUDA is already installed on your Jetson device.</p>
<p><strong>Install MXNet</strong></p>
<p>Installing MXNet is a two-step process:</p>
<ol class="simple">
<li>Build the shared library from the MXNet C++ source code.</li>
<li>Install the supported language-specific packages for MXNet.</li>
</ol>
<p><strong>Step 1</strong> Build the Shared Library</p>
<p>You need the following additional dependencies:</p>
<ul class="simple">
<li>Git (to pull code from GitHub)</li>
<li>libatlas (for linear algebraic operations)</li>
<li>libopencv (for computer vision operations)</li>
<li>python pip (to load relevant python packages for our language bindings)</li>
</ul>
<p>Install these dependencies using the following commands in any directory:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>
<span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">git</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">libatlas</span><span class="o">-</span><span class="n">base</span><span class="o">-</span><span class="n">dev</span> <span class="n">libopencv</span><span class="o">-</span><span class="n">dev</span> <span class="n">graphviz</span> <span class="n">python</span><span class="o">-</span><span class="n">pip</span>
<span class="n">sudo</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">pip</span> <span class="o">--</span><span class="n">upgrade</span>
<span class="n">sudo</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">setuptools</span> <span class="n">numpy</span> <span class="o">--</span><span class="n">upgrade</span>
<span class="n">sudo</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">graphviz</span> <span class="n">jupyter</span>
</pre></div>
</div>
<p>Clone the MXNet source code repository using the following <code class="docutils literal"><span class="pre">git</span></code> command in your home directory:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">apache</span><span class="o">/</span><span class="n">incubator</span><span class="o">-</span><span class="n">mxnet</span><span class="o">.</span><span class="n">git</span> <span class="o">--</span><span class="n">recursive</span>
<span class="n">cd</span> <span class="n">incubator</span><span class="o">-</span><span class="n">mxnet</span>
</pre></div>
</div>
<p>Edit the Makefile to install the MXNet with CUDA bindings to leverage the GPU on the Jetson:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">cp</span> <span class="n">make</span><span class="o">/</span><span class="n">crosscompile</span><span class="o">.</span><span class="n">jetson</span><span class="o">.</span><span class="n">mk</span> <span class="n">config</span><span class="o">.</span><span class="n">mk</span>
</pre></div>
</div>
<p>Edit the Mshadow Makefile to ensure MXNet builds with Pascal&#8217;s hardware level low precision acceleration by editing 3rdparty/mshadow/make/mshadow.mk and adding the following after line 122:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">MSHADOW_CFLAGS</span> <span class="o">+=</span> <span class="o">-</span><span class="n">DMSHADOW_USE_PASCAL</span><span class="o">=</span><span class="mi">1</span>
</pre></div>
</div>
<p>Now you can build the complete MXNet library with the following command:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> make -j $(nproc)
</pre></div>
</div>
<p>Executing this command creates a file called <code class="docutils literal"><span class="pre">libmxnet.so</span></code> in the mxnet/lib directory.</p>
<p><strong>Step 2</strong> Install MXNet Python Bindings</p>
<p>To install Python bindings run the following commands in the MXNet directory:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">cd</span> <span class="n">python</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">pip</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">e</span> <span class="o">.</span>
</pre></div>
</div>
<p>Note that the <code class="docutils literal"><span class="pre">-e</span></code> flag is optional. It is equivalent to <code class="docutils literal"><span class="pre">--editable</span></code> and means that if you edit the source files, these changes will be reflected in the package installed.</p>
<p>Add the mxnet folder to the path:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> cd ..
export MXNET_HOME=$(pwd)
echo &quot;export PYTHONPATH=$MXNET_HOME/python:$PYTHONPATH&quot; &gt;&gt; ~/.rc
source ~/.rc
</pre></div>
</div>
<p>You are now ready to run MXNet on your NVIDIA Jetson TX2 device.</p>
</div> <!-- End of jetson -->
</div> <!-- End of devices --><!-- This # tag restarts the page and allows reuse
of the div classes for validation sections, etc --><!-- Download -->
<hr></div>
<div class="section" id="source-download">
<span id="source-download"></span><h1>Source Download<a class="headerlink" href="#source-download" title="Permalink to this headline"></a></h1>
<p><a href="download.html">Download</a> your required version of MXNet and <a href="build_from_source.html">build from source</a>.</p>
</div>
</div>
</div>
<div class="sphinxsidebar rightsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installing MXNet</a><ul>
<li><a class="reference internal" href="#docker-installation">Docker installation</a></li>
<li><a class="reference internal" href="#build">Build</a></li>
<li><a class="reference internal" href="#install">Install</a></li>
</ul>
</li>
<li><a class="reference internal" href="#nvidia-jetson-tx-family">Nvidia Jetson TX family</a></li>
<li><a class="reference internal" href="#source-download">Source Download</a></li>
</ul>
</div>
</div>
</div><div class="footer">
<div class="section-disclaimer">
<div class="container">
<div>
<img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/apache_incubator_logo.png" height=60>
<p>
Apache MXNet is an effort undergoing incubation at The Apache Software Foundation (ASF), <strong>sponsored by the <i>Apache Incubator</i></strong>. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
</p>
<p>
"Copyright © 2017-2018, The Apache Software Foundation
Apache MXNet, MXNet, Apache, the Apache feather, and the Apache MXNet project logo are either registered trademarks or trademarks of the Apache Software Foundation."
</p>
</div>
</div>
</div>
</div> <!-- pagename != index -->
</div>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script type="text/javascript" src="../_static/js/sidebar.js"></script>
<script type="text/javascript" src="../_static/js/search.js"></script>
<script type="text/javascript" src="../_static/js/navbar.js"></script>
<script type="text/javascript" src="../_static/js/clipboard.min.js"></script>
<script type="text/javascript" src="../_static/js/copycode.js"></script>
<script type="text/javascript" src="../_static/js/page.js"></script>
<script type="text/javascript" src="../_static/js/docversion.js"></script>
<script type="text/javascript">
$('body').ready(function () {
$('body').css('visibility', 'visible');
});
</script>
</body>
</html>