blob: b738d4fea05c479d17dae47572e87ed730627bd0 [file] [log] [blame]
<!DOCTYPE html>
<!---
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.
-->
<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">
<link href="/versions/1.9.1/assets/img/mxnet-icon.png" rel="icon" type="image/png"><!-- Begin Jekyll SEO tag v2.6.1 -->
<title>Get Started | Apache MXNet</title>
<meta name="generator" content="Jekyll v3.8.6" />
<meta property="og:title" content="Get Started" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="A flexible and efficient library for deep learning." />
<meta property="og:description" content="A flexible and efficient library for deep learning." />
<link rel="canonical" href="https://mxnet.apache.org/versions/1.9.1/get_started/" />
<meta property="og:url" content="https://mxnet.apache.org/versions/1.9.1/get_started/" />
<meta property="og:site_name" content="Apache MXNet" />
<script type="application/ld+json">
{"description":"A flexible and efficient library for deep learning.","headline":"Get Started","@type":"WebPage","url":"https://mxnet.apache.org/versions/1.9.1/get_started/","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/versions/1.9.1/assets/docsearch.min.css" /><link rel="stylesheet" href="/versions/1.9.1/assets/main.css"><link type="application/atom+xml" rel="alternate" href="https://mxnet.apache.org/versions/1.9.1/feed.xml" title="Apache MXNet" /><!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '23']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<script src="/versions/1.9.1/assets/js/jquery-3.3.1.min.js"></script>
<script src="/versions/1.9.1/assets/js/docsearch.min.js"></script><script src="/versions/1.9.1/assets/js/globalSearch.js" defer></script>
<script src="/versions/1.9.1/assets/js/clipboard.js" defer></script>
<script src="/versions/1.9.1/assets/js/copycode.js" defer></script></head>
<body><header class="site-header" role="banner">
<script>
$(document).ready(function () {
// HEADER OPACITY LOGIC
function opacity_header() {
var value = "rgba(4,140,204," + ($(window).scrollTop() / 300 + 0.4) + ")"
$('.site-header').css("background-color", value)
}
$(window).scroll(function () {
opacity_header()
})
opacity_header();
// MENU SELECTOR LOGIC
$('.page-link').each( function () {
if (window.location.href.includes(this.href)) {
$(this).addClass("page-current");
}
});
})
</script>
<div class="wrapper">
<a class="site-title" rel="author" href="/versions/1.9.1/"><img
src="/versions/1.9.1/assets/img/mxnet_logo.png" class="site-header-logo"></a>
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger"/>
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>
<div class="gs-search-border">
<div id="gs-search-icon"></div>
<form id="global-search-form">
<input id="global-search" type="text" title="Search" placeholder="Search" />
<div id="global-search-dropdown-container">
<button class="gs-current-version btn" type="button" data-toggle="dropdown">
<span id="gs-current-version-label">1.9.1</span>
<svg class="gs-dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true">
<path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path>
</svg>
</button>
<ul class="gs-opt-group gs-version-dropdown">
<li class="gs-opt gs-versions">master</li>
<li class="gs-opt gs-versions active">1.9.1</li>
<li class="gs-opt gs-versions">1.8.0</li>
<li class="gs-opt gs-versions">1.7.0</li>
<li class="gs-opt gs-versions">1.6.0</li>
<li class="gs-opt gs-versions">1.5.0</li>
<li class="gs-opt gs-versions">1.4.1</li>
<li class="gs-opt gs-versions">1.3.1</li>
<li class="gs-opt gs-versions">1.2.1</li>
<li class="gs-opt gs-versions">1.1.0</li>
<li class="gs-opt gs-versions">1.0.0</li>
<li class="gs-opt gs-versions">0.12.1</li>
<li class="gs-opt gs-versions">0.11.0</li>
</ul>
</div>
<span id="global-search-close">x</span>
</form>
</div>
<div class="trigger">
<div id="global-search-mobile-border">
<div id="gs-search-icon-mobile"></div>
<input id="global-search-mobile" placeholder="Search..." type="text"/>
<div id="global-search-dropdown-container-mobile">
<button class="gs-current-version-mobile btn" type="button" data-toggle="dropdown">
<svg class="gs-dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true">
<path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path>
</svg>
</button>
<ul class="gs-opt-group gs-version-dropdown-mobile">
<li class="gs-opt gs-versions">master</li>
<li class="gs-opt gs-versions active">1.9.1</li>
<li class="gs-opt gs-versions">1.8.0</li>
<li class="gs-opt gs-versions">1.7.0</li>
<li class="gs-opt gs-versions">1.6.0</li>
<li class="gs-opt gs-versions">1.5.0</li>
<li class="gs-opt gs-versions">1.4.1</li>
<li class="gs-opt gs-versions">1.3.1</li>
<li class="gs-opt gs-versions">1.2.1</li>
<li class="gs-opt gs-versions">1.1.0</li>
<li class="gs-opt gs-versions">1.0.0</li>
<li class="gs-opt gs-versions">0.12.1</li>
<li class="gs-opt gs-versions">0.11.0</li>
</ul>
</div>
</div>
<a class="page-link" href="/versions/1.9.1/get_started">Get Started</a>
<a class="page-link" href="/versions/1.9.1/features">Features</a>
<a class="page-link" href="/versions/1.9.1/ecosystem">Ecosystem</a>
<a class="page-link" href="/versions/1.9.1/api">Docs & Tutorials</a>
<a class="page-link" href="/versions/1.9.1/trusted_by">Trusted By</a>
<a class="page-link" href="https://github.com/apache/mxnet">GitHub</a>
<div class="dropdown" style="min-width:100px">
<span class="dropdown-header">Apache
<svg class="dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true"><path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path></svg>
</span>
<div class="dropdown-content" style="min-width:250px">
<a href="https://www.apache.org/foundation/">Apache Software Foundation</a>
<a href="https://www.apache.org/licenses/">License</a>
<a href="/versions/1.9.1/api/faq/security.html">Security</a>
<a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy</a>
<a href="https://www.apache.org/events/current-event">Events</a>
<a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a href="https://www.apache.org/foundation/thanks.html">Thanks</a>
</div>
</div>
<div class="dropdown">
<span class="dropdown-header">1.9.1
<svg class="dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true"><path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path></svg>
</span>
<div class="dropdown-content">
<a href="/">master</a>
<a class="dropdown-option-active" href="/versions/1.9.1/">1.9.1</a>
<a href="/versions/1.8.0/">1.8.0</a>
<a href="/versions/1.7.0/">1.7.0</a>
<a href="/versions/1.6.0/">1.6.0</a>
<a href="/versions/1.5.0/">1.5.0</a>
<a href="/versions/1.4.1/">1.4.1</a>
<a href="/versions/1.3.1/">1.3.1</a>
<a href="/versions/1.2.1/">1.2.1</a>
<a href="/versions/1.1.0/">1.1.0</a>
<a href="/versions/1.0.0/">1.0.0</a>
<a href="/versions/0.12.1/">0.12.1</a>
<a href="/versions/0.11.0/">0.11.0</a>
</div>
</div>
</div>
</nav>
</div>
</header>
<main class="page-content" aria-label="Content">
<script>
</script>
<article class="post">
<header class="post-header wrapper">
<h1 class="post-title">Get Started</h1>
<h3></h3><a style="float:left; margin-top:20px" href="/versions/1.9.1/api/python/docs/tutorials" class="btn btn-action">Apache MXNet Tutorials
<span class="span-accented"></span></a></header>
<div class="post-content">
<div class="wrapper">
<!--- 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>
<div class="get-started-from-source">
<div class="wrapper">
<h2>Build and install Apache MXNet from source</h2>
<p>
To build and install Apache MXNet from the official Apache Software Foundation
signed source code please follow our <a href="/get_started/build_from_source">Building From Source</a> guide.
</p>
<p>
The signed source releases are available <a href="/get_started/download">here</a>
</p>
</div>
</div>
<script>
/** Defaults **/
/** See options.js for the full ugly script **/
var versionSelect = defaultVersion = 'v1.9.1';
var platformSelect = 'linux';
var languageSelect = 'python';
var processorSelect = 'cpu';
var environSelect = 'pip';
</script>
<script src="/versions/1.9.1/assets/js/options.js"></script>
<div class="install-selector">
<h2>Platform and use-case specific instructions for using Apache MXNet</h2>
<p>
Please indicate your preferred configuration below to see specific instructions.
</p>
<br>
<br>
<div class="install-widget">
<div class="row">
<div class="col-3 install-left">
<span>MXNet Version</span>
</div>
<div class="col-9 install-right">
<div class="dropdown" id="version-dropdown-container">
<button class="current-version dropbtn btn" type="button" data-toggle="dropdown">
v1.9.1
<svg class="dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true">
<path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path>
</svg>
</button>
<ul class="opt-group version-dropdown">
<li class="opt active versions"><a href="#">v1.9.1</a></li>
<li class="opt versions"><a href="#">v1.8.0</a></li>
<li class="opt versions"><a href="#">v1.7.0</a></li>
<li class="opt versions"><a href="#">v1.6.0</a></li>
<li class="opt versions"><a href="#">v1.5.1</a></li>
<li class="opt versions"><a href="#">v1.4.1</a></li>
<li class="opt 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>
</ul>
</div>
</div>
</div>
<!-- START - OS Menu -->
<div class="row">
<div class="col-3 install-left">
<span>OS / Platform</span>
</div>
<div class="col-9 install-right">
<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>
</div>
</div>
<!-- START - Language Menu -->
<div class="linux macos windows">
<div class="row">
<div class="col-3 install-left">
<span>Language</span>
</div>
<div class="col-9 install-right">
<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>
</div>
</div>
<!-- No CPU GPU for other Devices -->
<div class="linux macos windows cloud">
<div class="python cloud devices">
<div class="row">
<div class="col-3 install-left">
<span>GPU / CPU</span>
</div>
<div class="col-9 install-right">
<div class="btn-group opt-group" role="group">
<button type="button" class="btn btn-default processors opt active">GPU</button>
<button type="button" class="btn btn-default processors opt">CPU</button>
</div>
</div>
</div>
</div>
</div>
<!-- other devices -->
<div class="devices">
<div class="row">
<div class="col-3 install-left">
<span>Device</span>
</div>
<div class="col-9 install-right">
<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>
</div>
</div>
<!-- Python Distribution -->
<div class="linux macos windows">
<div class="python">
<div class="cpu gpu">
<div class="row">
<div class="col-3 install-left">
<span>Distribution</span>
</div>
<div class="col-9 install-right">
<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>
</div>
</div>
</div>
<!-- END - Main Menu -->
<br>
<br>
<br>
<div class="install-content">
<div class="linux">
<div class="python">
<!-- START - Linux Python CPU Installation Instructions -->
<div class="cpu">
<div class="pip">
<p>WARNING: the following PyPI package names are provided for your convenience but
they point to packages that are <em>not</em> provided nor endorsed by the Apache
Software Foundation. As such, they might contain software components with more
restrictive licenses than the Apache License and you’ll need to decide whether
they are appropriate for your usage. The packages linked here contain GPL GCC
Runtime Library components. Like all Apache Releases, the official Apache MXNet
releases consist of source code only and are found at the <a href="https://mxnet.apache.org/get_started/download">Download
page</a>.</p>
<p>Run the following command:</p>
<div class="v1-9-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet</code></pre></figure>
</div>
<p><!-- End of v1-9-1 --></p>
<div class="v1-8-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.8.0.post0</code></pre></figure>
Start from 1.7.0 release, oneDNN(previously known as: MKL-DNN/DNNL) is enabled
in pip packages by default.
oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform
performance library of basic building blocks for deep learning applications.
The library is optimized for Intel Architecture Processors, Intel Processor
Graphics and Xe architecture-based Graphics. Support for other architectures
such as Arm* 64-bit Architecture (AArch64) and OpenPOWER* Power ISA (PPC64) is
experimental.
oneDNN is intended for deep learning applications and framework developers
interested in improving application performance on Intel CPUs and GPUs, more
details can be found <a href="https://github.com/oneapi-src/oneDNN">here</a>.
You can find performance numbers in the
<a href="https://mxnet.apache.org/versions/1.8.0/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
To install native MXNet without oneDNN, run the following command:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-native<span class="o">==</span>1.8.0.post0</code></pre></figure>
</div>
<p><!-- End of v1-8-0 --></p>
<div class="v1-7-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.7.0.post2</code></pre></figure>
Start from 1.7.0 release, oneDNN(previously known as: MKL-DNN/DNNL) is enabled
in pip packages by default.
oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform
performance library of basic building blocks for deep learning applications.
The library is optimized for Intel Architecture Processors, Intel Processor
Graphics and Xe architecture-based Graphics. Support for other architectures
such as Arm* 64-bit Architecture (AArch64) and OpenPOWER* Power ISA (PPC64) is
experimental.
Please note that the Linux CPU pip wheels for AArch64 platforms are built with
oneDNN with Arm Performance Libraries (APL) integrated. Because APL's license
is not compatible with Apache license, you would need to
<a href="https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries">manually install</a> APL
in your system.
oneDNN is intended for deep learning applications and framework developers
interested in improving application performance on Intel CPUs and GPUs, more
details can be found <a href="https://github.com/oneapi-src/oneDNN">here</a>.
You can find performance numbers in the
<a href="https://mxnet.apache.org/versions/1.7.0/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
To install native MXNet without oneDNN, run the following command:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-native<span class="o">==</span>1.7.0</code></pre></figure>
</div>
<p><!-- End of v1-7-0 --></p>
<div class="v1-6-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.6.0</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.6.0</code></pre></figure>
</div>
<p><!-- End of v1-6-0 --></p>
<div class="v1-5-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.5.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.5.1</code></pre></figure>
</div>
<p><!-- End of v1-5-1 --></p>
<div class="v1-4-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.4.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.4.1</code></pre></figure>
</div>
<p><!-- End of v1-4-1 --></p>
<div class="v1-3-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.3.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.3.1</code></pre></figure>
</div>
<p><!-- End of v1-3-1 --></p>
<div class="v1-2-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.2.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.2.1</code></pre></figure>
</div>
<p><!-- End of v1-2-1 --></p>
<div class="v1-1-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.1.0</code></pre></figure>
</div>
<p><!-- End of v1-1-0--></p>
<div class="v1-0-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.0.0</code></pre></figure>
</div>
<p><!-- End of v1-0-0--></p>
<div class="v0-12-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.12.1</code></pre></figure>
For MXNet 0.12.0:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.12.0</code></pre></figure>
</div>
<p><!-- End of v0-12-1--></p>
<div class="v0-11-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.11.0</code></pre></figure>
</div>
<p><!-- End of v0-11-0--></p>
<p><br /></p>
<p>You can then <a href="/get_started/validate_mxnet.html">validate your MXNet installation</a>.</p>
<div style="text-align: center">
<img src="/versions/1.9.1/assets/img/pip-packages-1.9.1.png" alt="pip packages" />
</div>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu101</em> means the package is built with CUDA/cuDNN and the CUDA version is
10.1.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
</div> <!-- End of pip -->
<div class="docker">
<p>WARNING: the following links and names of binary distributions are provided for
your convenience but they point to packages that are <em>not</em> provided nor endorsed
by the Apache Software Foundation. As such, they might contain software
components with more restrictive licenses than the Apache License and you’ll
need to decide whether they are appropriate for your usage. Like all Apache
Releases, the official Apache MXNet releases consist of source code
only and are found at
the <a href="https://mxnet.apache.org/get_started/download">Download page</a>.</p>
<p>Docker images with <em>MXNet</em> are available at <a href="https://hub.docker.com/r/mxnet/">DockerHub</a>.
After you installed Docker on your machine, you can use them via:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>docker pull mxnet/python</code></pre></figure>
<p>You can list docker images to see if mxnet/python docker image pull was successful.</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>docker images <span class="c"># Use sudo if you skip Step 2</span>
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python latest 00d026968b3c 3 weeks ago 1.41 GB</code></pre></figure>
<p>You can then <a href="/get_started/validate_mxnet.html">validate the installation</a>.</p>
</div> <!-- END of docker -->
<div class="build-from-source">
<p>Please follow the build from source instructions linked above.</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">
<p>WARNING: the following PyPI package names are provided for your convenience but
they point to packages that are <em>not</em> provided nor endorsed by the Apache
Software Foundation. As such, they might contain software components with more
restrictive licenses than the Apache License and you’ll need to decide whether
they are appropriate for your usage. The packages linked here contain
proprietary parts of the NVidia CUDA SDK and GPL GCC Runtime Library components.
Like all Apache Releases, the official Apache MXNet releases
consist of source code only and are found at the <a href="https://mxnet.apache.org/get_started/download">Download
page</a>.</p>
<p>Run the following command:</p>
<div class="v1-9-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102</code></pre></figure>
</div>
<p><!-- End of v1-9-1 --></p>
<div class="v1-8-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102<span class="o">==</span>1.8.0.post0</code></pre></figure>
</div>
<p><!-- End of v1-8-0 --></p>
<div class="v1-7-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102<span class="o">==</span>1.7.0</code></pre></figure>
</div>
<p><!-- End of v1-7-0 --></p>
<div class="v1-6-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102<span class="o">==</span>1.6.0</code></pre></figure>
</div>
<p><!-- End of v1-6-0 --></p>
<div class="v1-5-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu101<span class="o">==</span>1.5.1</code></pre></figure>
</div>
<p><!-- End of v1-5-1 --></p>
<div class="v1-4-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu101<span class="o">==</span>1.4.1</code></pre></figure>
</div>
<p><!-- End of v1-4-1 --></p>
<div class="v1-3-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu92<span class="o">==</span>1.3.1</code></pre></figure>
</div>
<p><!-- End of v1-3-1--></p>
<div class="v1-2-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu92<span class="o">==</span>1.2.1</code></pre></figure>
</div>
<p><!-- End of v1-2-1--></p>
<div class="v1-1-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu91<span class="o">==</span>1.1.0</code></pre></figure>
</div>
<p><!-- End of v1-1-0--></p>
<div class="v1-0-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu90<span class="o">==</span>1.0.0</code></pre></figure>
</div>
<p><!-- End of v1-0-0--></p>
<div class="v0-12-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu90<span class="o">==</span>0.12.1</code></pre></figure>
</div>
<p><!-- End of v0-12-1--></p>
<div class="v0-11-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu80<span class="o">==</span>0.11.0</code></pre></figure>
</div>
<p><!-- End of v0-11-0--></p>
<p><br /></p>
<p>You can then <a href="/get_started/validate_mxnet.html">validate your MXNet installation</a>.</p>
<div style="text-align: center">
<img src="/versions/1.9.1/assets/img/pip-packages-1.9.1.png" alt="pip packages" />
</div>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu101</em> means the package is built with CUDA/cuDNN and the CUDA version is
10.1.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
<p>CUDA should be installed first. Starting from version 1.8.0, CUDNN and NCCL should be installed as well.</p>
<p><strong>Important:</strong> Make sure your installed CUDA (CUDNN/NCCL if applicable) version matches the CUDA version in the pip package.</p>
<p>Check your CUDA version with the following command:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">nvcc <span class="nt">--version</span></code></pre></figure>
<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>WARNING: the following links and names of binary distributions are provided for
your convenience but they point to packages that are <em>not</em> provided nor endorsed
by the Apache Software Foundation. As such, they might contain software
components with more restrictive licenses than the Apache License and you’ll
need to decide whether they are appropriate for your usage. Like all Apache
Releases, the official Apache MXNet releases consist of source code
only and are found at
the <a href="https://mxnet.apache.org/get_started/download">Download page</a>.</p>
<p>Docker images with <em>MXNet</em> are available at <a href="https://hub.docker.com/r/mxnet/">DockerHub</a>.</p>
<p>Please follow the <a href="https://github.com/NVIDIA/nvidia-docker/wiki">NVidia Docker installation
instructions</a> to enable the usage
of GPUs from the docker containers.</p>
<p>After you installed Docker on your machine, you can use them via:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>docker pull mxnet/python:gpu <span class="c"># Use sudo if you skip Step 2</span></code></pre></figure>
<p>You can list docker images to see if mxnet/python docker image pull was successful.</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>docker images <span class="c"># Use sudo if you skip Step 2</span>
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python gpu 493b2683c269 3 weeks ago 4.77 GB</code></pre></figure>
<p>You can then <a href="/get_started/validate_mxnet.html">validate the installation</a>.</p>
</div> <!-- END of docker -->
<div class="build-from-source">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- END of build from source -->
</div> <!-- END of GPU -->
</div> <!-- END of Python -->
<!-- END - Linux Python Installation Instructions -->
<div class="r">
<p>You will need to R v3.4.4+ and build MXNet from source. Please follow the
instructions linked above.</p>
</div> <!-- END of R -->
<div class="scala">
<p>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="/get_started/java_setup.html">MXNet-Java setup guide</a> for a detailed set of
instructions to help you with the setup process.</p>
<p><a href="https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.5.0~~">
<img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge" />
</a></p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.mxnet<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>mxnet-full_2.11-linux-x86_64-cpu<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;version&gt;</span>[1.5.0, )<span class="nt">&lt;/version&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
</div> <!-- End of scala -->
<div class="clojure">
<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="/versions/1.9.1/get_started/scala_setup">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-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge" /></a></p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.mxnet.contrib.clojure<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>clojure-mxnet-linux-cpu<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
</div> <!-- End of clojure -->
<div class="java">
<p>Previously available binaries distributed via Maven have been removed as they
redistributed Category-X binaries in violation of Apache Software Foundation
(ASF) policies.</p>
<p>At this point in time, no third-party binary Java packages are available. Please
follow the build from source instructions linked above.</p>
</div> <!-- End of java -->
<div class="julia">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- End of julia -->
<div class="perl">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- End of perl -->
<div class="cpp">
<p>To use the C++ package, build from source the <code>USE_CPP_PACKAGE=1</code> option. Please
refer to the build from source instructions linked above.</p>
</div> <!-- END - C++-->
</div> <!-- END - Linux -->
<!-- START - MacOS Python CPU Installation Instructions -->
<div class="macos">
<div class="python">
<!-- START - MacOS Python CPU Installation Instructions -->
<div class="cpu">
<div class="pip">
<p>WARNING: the following PyPI package names are provided for your convenience but
they point to packages that are <em>not</em> provided nor endorsed by the Apache
Software Foundation. As such, they might contain software components with more
restrictive licenses than the Apache License and you’ll need to decide whether
they are appropriate for your usage. The packages linked here contain GPL GCC
Runtime Library components. Like all Apache Releases, the official Apache MXNet
releases consist of source code only and are found at the <a href="https://mxnet.apache.org/get_started/download">Download
page</a>.</p>
<p>Run the following command:</p>
<div class="v1-9-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet</code></pre></figure>
</div>
<p><!-- End of v1-9-1 --></p>
<div class="v1-8-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.8.0.post0</code></pre></figure>
Start from 1.7.0 release, oneDNN(previously known as: MKL-DNN/DNNL) is enabled
in pip packages by default.
oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform
performance library of basic building blocks for deep learning applications.
The library is optimized for Intel Architecture Processors, Intel Processor
Graphics and Xe architecture-based Graphics. Support for other architectures
such as Arm* 64-bit Architecture (AArch64) and OpenPOWER* Power ISA (PPC64) is
experimental.
oneDNN is intended for deep learning applications and framework developers
interested in improving application performance on Intel CPUs and GPUs, more
details can be found <a href="https://github.com/oneapi-src/oneDNN">here</a>.
You can find performance numbers in the
<a href="https://mxnet.apache.org/versions/1.8.0/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
To install native MXNet without oneDNN, run the following command:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-native<span class="o">==</span>1.8.0.post0</code></pre></figure>
</div>
<p><!-- End of v1-8-0 --></p>
<div class="v1-7-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.7.0.post2</code></pre></figure>
Start from 1.7.0 release, oneDNN(previously known as: MKL-DNN/DNNL) is enabled
in pip packages by default.
oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform
performance library of basic building blocks for deep learning applications.
The library is optimized for Intel Architecture Processors, Intel Processor
Graphics and Xe architecture-based Graphics. Support for other architectures
such as Arm* 64-bit Architecture (AArch64) and OpenPOWER* Power ISA (PPC64) is
experimental.
Please note that the Linux CPU pip wheels for AArch64 platforms are built with
oneDNN with Arm Performance Libraries (APL) integrated. Because APL's license
is not compatible with Apache license, you would need to
<a href="https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries">manually install</a> APL
in your system.
oneDNN is intended for deep learning applications and framework developers
interested in improving application performance on Intel CPUs and GPUs, more
details can be found <a href="https://github.com/oneapi-src/oneDNN">here</a>.
You can find performance numbers in the
<a href="https://mxnet.apache.org/versions/1.7.0/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
To install native MXNet without oneDNN, run the following command:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-native<span class="o">==</span>1.7.0</code></pre></figure>
</div>
<p><!-- End of v1-7-0 --></p>
<div class="v1-6-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.6.0</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.6.0</code></pre></figure>
</div>
<p><!-- End of v1-6-0 --></p>
<div class="v1-5-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.5.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.5.1</code></pre></figure>
</div>
<p><!-- End of v1-5-1 --></p>
<div class="v1-4-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.4.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.4.1</code></pre></figure>
</div>
<p><!-- End of v1-4-1 --></p>
<div class="v1-3-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.3.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.3.1</code></pre></figure>
</div>
<p><!-- End of v1-3-1 --></p>
<div class="v1-2-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.2.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.2.1</code></pre></figure>
</div>
<p><!-- End of v1-2-1 --></p>
<div class="v1-1-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.1.0</code></pre></figure>
</div>
<p><!-- End of v1-1-0--></p>
<div class="v1-0-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.0.0</code></pre></figure>
</div>
<p><!-- End of v1-0-0--></p>
<div class="v0-12-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.12.1</code></pre></figure>
For MXNet 0.12.0:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.12.0</code></pre></figure>
</div>
<p><!-- End of v0-12-1--></p>
<div class="v0-11-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.11.0</code></pre></figure>
</div>
<p><!-- End of v0-11-0--></p>
<p><br /></p>
<p>You can then <a href="/get_started/validate_mxnet.html">validate your MXNet installation</a>.</p>
<div style="text-align: center">
<img src="/versions/1.9.1/assets/img/pip-packages-1.9.1.png" alt="pip packages" />
</div>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu101</em> means the package is built with CUDA/cuDNN and the CUDA version is
10.1.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
</div> <!-- End of pip -->
<div class="docker">
<p>WARNING: the following links and names of binary distributions are provided for
your convenience but they point to packages that are <em>not</em> provided nor endorsed
by the Apache Software Foundation. As such, they might contain software
components with more restrictive licenses than the Apache License and you’ll
need to decide whether they are appropriate for your usage. Like all Apache
Releases, the official Apache MXNet releases consist of source code
only and are found at
the <a href="https://mxnet.apache.org/get_started/download">Download page</a>.</p>
<p>Docker images with <em>MXNet</em> are available at <a href="https://hub.docker.com/r/mxnet/">DockerHub</a>.
After you installed Docker on your machine, you can use them via:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>docker pull mxnet/python</code></pre></figure>
<p>You can list docker images to see if mxnet/python docker image pull was successful.</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>docker images <span class="c"># Use sudo if you skip Step 2</span>
REPOSITORY TAG IMAGE ID CREATED SIZE
mxnet/python latest 00d026968b3c 3 weeks ago 1.41 GB</code></pre></figure>
<p>You can then <a href="/get_started/validate_mxnet.html">validate the installation</a>.</p>
</div> <!-- END of docker -->
<div class="build-from-source">
<p>Please follow the build from source instructions linked above.</p>
</div><!-- END of build from source -->
</div><!-- END of CPU -->
<!-- END - MacOS Python CPU Installation Instructions -->
<!-- START - MacOS Python GPU Installation Instructions -->
<div class="gpu">
<div class="build-from-source">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- END of build from source -->
</div> <!-- END of GPU -->
</div> <!-- END of Python -->
<!-- END - MacOS Python Installation Instructions -->
<div class="r">
<p>You will need to R v3.4.4+ and build MXNet from source. Please follow the
instructions linked above.</p>
</div> <!-- END of R -->
<div class="scala">
<p>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="/get_started/java_setup.html">MXNet-Java setup guide</a> for a detailed set of
instructions to help you with the setup process.</p>
<p><a href="https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.5.0~~">
<img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge" />
</a></p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.mxnet<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>mxnet-full_2.11-linux-x86_64-cpu<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;version&gt;</span>[1.5.0, )<span class="nt">&lt;/version&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
</div> <!-- End of scala -->
<div class="clojure">
<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="/versions/1.9.1/get_started/scala_setup">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-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge" /></a></p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.mxnet.contrib.clojure<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>clojure-mxnet-linux-cpu<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
</div> <!-- End of clojure -->
<div class="java">
<p>Previously available binaries distributed via Maven have been removed as they
redistributed Category-X binaries in violation of Apache Software Foundation
(ASF) policies.</p>
<p>At this point in time, no third-party binary Java packages are available. Please
follow the build from source instructions linked above.</p>
</div> <!-- End of java -->
<div class="julia">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- End of julia -->
<div class="perl">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- End of perl -->
<div class="cpp">
<p>To use the C++ package, build from source the <code>USE_CPP_PACKAGE=1</code> option. Please
refer to the build from source instructions linked above.</p>
</div> <!-- END - C++-->
</div> <!-- END - MacOS -->
<div class="windows">
<div class="python">
<!-- START - Windows Python CPU Installation Instructions -->
<div class="cpu">
<div class="pip">
<p>WARNING: the following PyPI package names are provided for your convenience but
they point to packages that are <em>not</em> provided nor endorsed by the Apache
Software Foundation. As such, they might contain software components with more
restrictive licenses than the Apache License and you’ll need to decide whether
they are appropriate for your usage. The packages linked here contain GPL GCC
Runtime Library components. Like all Apache Releases, the official Apache MXNet
releases consist of source code only and are found at the <a href="https://mxnet.apache.org/get_started/download">Download
page</a>.</p>
<p>Run the following command:</p>
<div class="v1-9-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet</code></pre></figure>
</div>
<p><!-- End of v1-9-1 --></p>
<div class="v1-8-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.8.0.post0</code></pre></figure>
Start from 1.7.0 release, oneDNN(previously known as: MKL-DNN/DNNL) is enabled
in pip packages by default.
oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform
performance library of basic building blocks for deep learning applications.
The library is optimized for Intel Architecture Processors, Intel Processor
Graphics and Xe architecture-based Graphics. Support for other architectures
such as Arm* 64-bit Architecture (AArch64) and OpenPOWER* Power ISA (PPC64) is
experimental.
oneDNN is intended for deep learning applications and framework developers
interested in improving application performance on Intel CPUs and GPUs, more
details can be found <a href="https://github.com/oneapi-src/oneDNN">here</a>.
You can find performance numbers in the
<a href="https://mxnet.apache.org/versions/1.8.0/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
To install native MXNet without oneDNN, run the following command:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-native<span class="o">==</span>1.8.0.post0</code></pre></figure>
</div>
<p><!-- End of v1-8-0 --></p>
<div class="v1-7-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.7.0.post2</code></pre></figure>
Start from 1.7.0 release, oneDNN(previously known as: MKL-DNN/DNNL) is enabled
in pip packages by default.
oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform
performance library of basic building blocks for deep learning applications.
The library is optimized for Intel Architecture Processors, Intel Processor
Graphics and Xe architecture-based Graphics. Support for other architectures
such as Arm* 64-bit Architecture (AArch64) and OpenPOWER* Power ISA (PPC64) is
experimental.
Please note that the Linux CPU pip wheels for AArch64 platforms are built with
oneDNN with Arm Performance Libraries (APL) integrated. Because APL's license
is not compatible with Apache license, you would need to
<a href="https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries">manually install</a> APL
in your system.
oneDNN is intended for deep learning applications and framework developers
interested in improving application performance on Intel CPUs and GPUs, more
details can be found <a href="https://github.com/oneapi-src/oneDNN">here</a>.
You can find performance numbers in the
<a href="https://mxnet.apache.org/versions/1.7.0/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
To install native MXNet without oneDNN, run the following command:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-native<span class="o">==</span>1.7.0</code></pre></figure>
</div>
<p><!-- End of v1-7-0 --></p>
<div class="v1-6-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.6.0</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.6.0</code></pre></figure>
</div>
<p><!-- End of v1-6-0 --></p>
<div class="v1-5-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.5.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.5.1</code></pre></figure>
</div>
<p><!-- End of v1-5-1 --></p>
<div class="v1-4-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.4.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.4.1</code></pre></figure>
</div>
<p><!-- End of v1-4-1 --></p>
<div class="v1-3-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.3.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.3.1</code></pre></figure>
</div>
<p><!-- End of v1-3-1 --></p>
<div class="v1-2-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.2.1</code></pre></figure>
MKL-DNN enabled pip packages are optimized for Intel hardware. You can find
performance numbers in the
<a href="https://mxnet.apache.org/versions/1.6/api/faq/perf.html#intel-cpu">
MXNet tuning guide</a>.
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span>mxnet-mkl<span class="o">==</span>1.2.1</code></pre></figure>
</div>
<p><!-- End of v1-2-1 --></p>
<div class="v1-1-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.1.0</code></pre></figure>
</div>
<p><!-- End of v1-1-0--></p>
<div class="v1-0-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>1.0.0</code></pre></figure>
</div>
<p><!-- End of v1-0-0--></p>
<div class="v0-12-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.12.1</code></pre></figure>
For MXNet 0.12.0:
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.12.0</code></pre></figure>
</div>
<p><!-- End of v0-12-1--></p>
<div class="v0-11-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">pip <span class="nb">install </span><span class="nv">mxnet</span><span class="o">==</span>0.11.0</code></pre></figure>
</div>
<p><!-- End of v0-11-0--></p>
<p><br /></p>
<p>You can then <a href="/get_started/validate_mxnet.html">validate your MXNet installation</a>.</p>
<div style="text-align: center">
<img src="/versions/1.9.1/assets/img/pip-packages-1.9.1.png" alt="pip packages" />
</div>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu101</em> means the package is built with CUDA/cuDNN and the CUDA version is
10.1.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
</div> <!-- End of pip -->
<div class="build-from-source">
<p>Please follow the build from source instructions linked above.</p>
</div><!-- END of build from source -->
</div><!-- END of CPU -->
<!-- END - Windows Python CPU Installation Instructions -->
<!-- START - Windows Python GPU Installation Instructions -->
<div class="gpu">
<div class="pip">
<p>WARNING: the following PyPI package names are provided for your convenience but
they point to packages that are <em>not</em> provided nor endorsed by the Apache
Software Foundation. As such, they might contain software components with more
restrictive licenses than the Apache License and you’ll need to decide whether
they are appropriate for your usage. The packages linked here contain
proprietary parts of the NVidia CUDA SDK and GPL GCC Runtime Library components.
Like all Apache Releases, the official Apache MXNet releases
consist of source code only and are found at the <a href="https://mxnet.apache.org/get_started/download">Download
page</a>.</p>
<p>Run the following command:</p>
<div class="v1-9-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102</code></pre></figure>
</div>
<p><!-- End of v1-9-1 --></p>
<div class="v1-8-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102<span class="o">==</span>1.8.0.post0</code></pre></figure>
</div>
<p><!-- End of v1-8-0 --></p>
<div class="v1-7-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102<span class="o">==</span>1.7.0</code></pre></figure>
</div>
<p><!-- End of v1-7-0 --></p>
<div class="v1-6-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu102<span class="o">==</span>1.6.0</code></pre></figure>
</div>
<p><!-- End of v1-6-0 --></p>
<div class="v1-5-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu101<span class="o">==</span>1.5.1</code></pre></figure>
</div>
<p><!-- End of v1-5-1 --></p>
<div class="v1-4-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu101<span class="o">==</span>1.4.1</code></pre></figure>
</div>
<p><!-- End of v1-4-1 --></p>
<div class="v1-3-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu92<span class="o">==</span>1.3.1</code></pre></figure>
</div>
<p><!-- End of v1-3-1--></p>
<div class="v1-2-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu92<span class="o">==</span>1.2.1</code></pre></figure>
</div>
<p><!-- End of v1-2-1--></p>
<div class="v1-1-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu91<span class="o">==</span>1.1.0</code></pre></figure>
</div>
<p><!-- End of v1-1-0--></p>
<div class="v1-0-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu90<span class="o">==</span>1.0.0</code></pre></figure>
</div>
<p><!-- End of v1-0-0--></p>
<div class="v0-12-1">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu90<span class="o">==</span>0.12.1</code></pre></figure>
</div>
<p><!-- End of v0-12-1--></p>
<div class="v0-11-0">
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>mxnet-cu80<span class="o">==</span>0.11.0</code></pre></figure>
</div>
<p><!-- End of v0-11-0--></p>
<p><br /></p>
<p>You can then <a href="/get_started/validate_mxnet.html">validate your MXNet installation</a>.</p>
<div style="text-align: center">
<img src="/versions/1.9.1/assets/img/pip-packages-1.9.1.png" alt="pip packages" />
</div>
<p><strong>NOTES:</strong></p>
<p><em>mxnet-cu101</em> means the package is built with CUDA/cuDNN and the CUDA version is
10.1.</p>
<p>All MKL pip packages are experimental prior to version 1.3.0.</p>
<p>CUDA should be installed first. Starting from version 1.8.0, CUDNN and NCCL should be installed as well.</p>
<p><strong>Important:</strong> Make sure your installed CUDA (CUDNN/NCCL if applicable) version matches the CUDA version in the pip package.</p>
<p>Check your CUDA version with the following command:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">nvcc <span class="nt">--version</span></code></pre></figure>
<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">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- END of build from source -->
</div> <!-- END of GPU -->
</div> <!-- END of Python -->
<!-- END - Windows Python Installation Instructions -->
<div class="r">
<p>You will need to R v3.4.4+ and build MXNet from source. Please follow the
instructions linked above.</p>
</div> <!-- END of R -->
<div class="scala">
<p>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="/get_started/java_setup.html">MXNet-Java setup guide</a> for a detailed set of
instructions to help you with the setup process.</p>
<p><a href="https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.5.0~~">
<img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge" />
</a></p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.mxnet<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>mxnet-full_2.11-linux-x86_64-cpu<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;version&gt;</span>[1.5.0, )<span class="nt">&lt;/version&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
</div> <!-- End of scala -->
<div class="clojure">
<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="/versions/1.9.1/get_started/scala_setup">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-cpu"><img src="https://img.shields.io/badge/org.apache.mxnet-linux cpu-green.svg" alt="maven badge" /></a></p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;dependency&gt;</span>
<span class="nt">&lt;groupId&gt;</span>org.apache.mxnet.contrib.clojure<span class="nt">&lt;/groupId&gt;</span>
<span class="nt">&lt;artifactId&gt;</span>clojure-mxnet-linux-cpu<span class="nt">&lt;/artifactId&gt;</span>
<span class="nt">&lt;/dependency&gt;</span></code></pre></figure>
</div> <!-- End of clojure -->
<div class="java">
<p>Previously available binaries distributed via Maven have been removed as they
redistributed Category-X binaries in violation of Apache Software Foundation
(ASF) policies.</p>
<p>At this point in time, no third-party binary Java packages are available. Please
follow the build from source instructions linked above.</p>
</div> <!-- End of java -->
<div class="julia">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- End of julia -->
<div class="perl">
<p>Please follow the build from source instructions linked above.</p>
</div> <!-- End of perl -->
<div class="cpp">
<p>To use the C++ package, build from source the <code>USE_CPP_PACKAGE=1</code> option. Please
refer to the build from source instructions linked above.</p>
</div> <!-- END - C++-->
</div> <!-- END - Windows -->
<!-- START - Cloud Python Installation Instructions -->
<div class="cloud">
<div class="gpu">
<p>MXNet is available on several cloud providers with GPU support. You can also
find GPU/CPU-hybrid support for use cases like scalable inference, or even
fractional GPU support with AWS Elastic Inference.</p>
<p>WARNING: the following cloud provider packages are provided for your convenience
but they point to packages that are <em>not</em> provided nor endorsed by the Apache
Software Foundation. As such, they might contain software components with more
restrictive licenses than the Apache License and you’ll need to decide whether
they are appropriate for your usage. Like all Apache Releases, the official
Apache MXNet releases consist of source code only and are found at
the <a href="https://mxnet.apache.org/get_started/download">Download page</a>.</p>
<ul>
<li><strong>Alibaba</strong></li>
<li><a href="https://docs.nvidia.com/ngc/ngc-alibaba-setup-guide/launching-nv-cloud-vm-console.html#launching-nv-cloud-vm-console">NVIDIA
VM</a></li>
<li><strong>Amazon Web Services</strong></li>
<li><a href="https://aws.amazon.com/sagemaker/">Amazon SageMaker</a> - Managed training and deployment of
MXNet models</li>
<li><a href="https://aws.amazon.com/machine-learning/amis/">AWS Deep Learning AMI</a> - Preinstalled
Conda environments
for Python 2 or 3 with MXNet, CUDA, cuDNN, MKL-DNN, and AWS Elastic Inference</li>
<li><a href="https://github.com/awslabs/dynamic-training-with-apache-mxnet-on-aws">Dynamic Training on
AWS</a> -
experimental manual EC2 setup or semi-automated CloudFormation setup</li>
<li><a href="https://aws.amazon.com/marketplace/pp/B076K31M1S">NVIDIA VM</a></li>
<li><strong>Google Cloud Platform</strong></li>
<li><a href="https://console.cloud.google.com/marketplace/details/nvidia-ngc-public/nvidia_gpu_cloud_image">NVIDIA
VM</a></li>
<li><strong>Microsoft Azure</strong></li>
<li><a href="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/nvidia.ngc_azure_17_11?tab=Overview">NVIDIA
VM</a></li>
<li><strong>Oracle Cloud</strong></li>
<li><a href="https://docs.cloud.oracle.com/iaas/Content/Compute/References/ngcimage.htm">NVIDIA VM</a></li>
</ul>
<p>All NVIDIA VMs use the <a href="https://ngc.nvidia.com/catalog/containers/nvidia:mxnet">NVIDIA MXNet Docker
container</a>.
Follow the <a href="https://ngc.nvidia.com/catalog/containers/nvidia:mxnet">container usage
instructions</a> found in
<a href="https://ngc.nvidia.com/">NVIDIA’s container repository</a>.</p>
</div> <!-- END gpu -->
<div class="cpu">
<p>MXNet should work on any cloud provider’s CPU-only instances. Follow the Python
pip install instructions, Docker instructions, or try the following preinstalled
option.</p>
<p>WARNING: the following cloud provider packages are provided for your convenience
but they point to packages that are <em>not</em> provided nor endorsed by the Apache
Software Foundation. As such, they might contain software components with more
restrictive licenses than the Apache License and you’ll need to decide whether
they are appropriate for your usage. Like all Apache Releases, the official
Apache MXNet releases consist of source code only and are found at
the <a href="https://mxnet.apache.org/get_started/download">Download page</a>.</p>
<ul>
<li><strong>Amazon Web Services</strong></li>
<li><a href="https://aws.amazon.com/machine-learning/amis/">AWS Deep Learning AMI</a> - Preinstalled
Conda environments
for Python 2 or 3 with MXNet and MKL-DNN.</li>
</ul>
</div> <!-- end cpu -->
</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 3B
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>
<h2 id="quick-installation">Quick installation</h2>
<p>You can use this <a href="https://mxnet-public.s3.amazonaws.com/install/raspbian/mxnet-1.5.0-py2.py3-none-any.whl">pre-built Python
wheel</a>
on a
Raspberry Pi 3B with Stretch. You will likely need to install several dependencies to get
MXNet to work.
Refer to the following <strong>Build</strong> section for details.</p>
<h2 id="docker-installation">Docker installation</h2>
<p><strong>Step 1</strong> Install Docker on your machine by following the <a 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 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>
<h2 id="build">Build</h2>
<p><strong>This cross compilation build is experimental.</strong></p>
<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.
You will want to run this on a fast cloud instance or locally on a fast PC to save time.
The resulting artifact will be located in <code>build/mxnet-x.x.x-py2.py3-none-any.whl</code>.
Copy this file to your Raspberry Pi.
The previously mentioned pre-built wheel was created using this method.</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">ci/build.py <span class="nt">-p</span> armv7
</code></pre></figure>
<h2 id="install-using-a-pip-wheel">Install using a pip wheel</h2>
<p>Your Pi will need several dependencies.</p>
<p>Install MXNet dependencies with the following:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">sudo </span>apt-get update
<span class="nb">sudo </span>apt-get <span class="nb">install</span> <span class="nt">-y</span> <span class="se">\</span>
apt-transport-https <span class="se">\</span>
build-essential <span class="se">\</span>
ca-certificates <span class="se">\</span>
cmake <span class="se">\</span>
curl <span class="se">\</span>
git <span class="se">\</span>
libatlas-base-dev <span class="se">\</span>
libcurl4-openssl-dev <span class="se">\</span>
libjemalloc-dev <span class="se">\</span>
liblapack-dev <span class="se">\</span>
libopenblas-dev <span class="se">\</span>
libopencv-dev <span class="se">\</span>
libzmq3-dev <span class="se">\</span>
ninja-build <span class="se">\</span>
python-dev <span class="se">\</span>
python-pip <span class="se">\</span>
software-properties-common <span class="se">\</span>
<span class="nb">sudo</span> <span class="se">\</span>
unzip <span class="se">\</span>
virtualenv <span class="se">\</span>
wget</code></pre></figure>
<p>Install virtualenv with:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">sudo </span>pip <span class="nb">install </span>virtualenv</code></pre></figure>
<p>Create a Python 2.7 environment for MXNet with:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">virtualenv <span class="nt">-p</span> <span class="sb">`</span>which python<span class="sb">`</span> mxnet_py27</code></pre></figure>
<p>You may use Python 3, however the <a href="https://mxnet.apache.org/api/python/docs/tutorials/deploy/inference/wine_detector.html">wine bottle detection
example</a>
for the
Pi with camera requires Python 2.7.</p>
<p>Activate the environment, then install the wheel we created previously, or install this
<a href="https://mxnet-public.s3.amazonaws.com/install/raspbian/mxnet-1.5.0-py2.py3-none-any.whl">prebuilt
wheel</a>.</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">source </span>mxnet_py27/bin/activate
pip <span class="nb">install </span>mxnet-x.x.x-py2.py3-none-any.whl</code></pre></figure>
<p>Test MXNet with the Python interpreter:</p>
<figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="err">$</span> <span class="n">python</span>
<span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">mxnet</span></code></pre></figure>
<p>If there are no errors then you’re ready to start using MXNet on your Pi!</p>
<h2 id="native-build">Native Build</h2>
<p>Installing MXNet from source is a two-step process:</p>
<ol>
<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>
<li>
<p>Git (to pull code from GitHub)</p>
</li>
<li>
<p>libblas (for linear algebraic operations)</p>
</li>
<li>
<p>libopencv (for computer vision operations. This is optional if you want to save RAM and
Disk Space)</p>
</li>
<li>
<p>A C++ compiler that supports C++ 11. The C++ compiler compiles and builds MXNet source
code. Supported
compilers include the following:</p>
</li>
<li><a 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 href="https://clang.llvm.org/">Clang (3.9 - 6)</a></li>
</ul>
<p>Install these dependencies using the following commands in any directory:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">sudo </span>apt-get update
<span class="nb">sudo </span>apt-get <span class="nt">-y</span> <span class="nb">install </span>git cmake ninja-build build-essential g++-4.9 c++-4.9 liblapack<span class="k">*</span>
libblas<span class="k">*</span> libopencv<span class="k">*</span>
libopenblas<span class="k">*</span> python3-dev python-dev virtualenv</code></pre></figure>
<p>Clone the MXNet source code repository using the following <code>git</code> command in your home
directory:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">git clone https://github.com/apache/mxnet.git <span class="nt">--recursive</span>
<span class="nb">cd </span>mxnet</code></pre></figure>
<p>Build:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">mkdir</span> <span class="nt">-p</span> build <span class="o">&amp;&amp;</span> <span class="nb">cd </span>build
cmake <span class="se">\</span>
<span class="nt">-DUSE_SSE</span><span class="o">=</span>OFF <span class="se">\</span>
<span class="nt">-DUSE_CUDA</span><span class="o">=</span>OFF <span class="se">\</span>
<span class="nt">-DUSE_OPENCV</span><span class="o">=</span>ON <span class="se">\</span>
<span class="nt">-DUSE_OPENMP</span><span class="o">=</span>ON <span class="se">\</span>
<span class="nt">-DUSE_MKL_IF_AVAILABLE</span><span class="o">=</span>OFF <span class="se">\</span>
<span class="nt">-DUSE_SIGNAL_HANDLER</span><span class="o">=</span>ON <span class="se">\</span>
<span class="nt">-DCMAKE_BUILD_TYPE</span><span class="o">=</span>Release <span class="se">\</span>
<span class="nt">-GNinja</span> ..
ninja <span class="nt">-j</span><span class="si">$(</span><span class="nb">nproc</span><span class="si">)</span></code></pre></figure>
<p>Some compilation units require memory close to 1GB, so it’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>libmxnet.so</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>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">sudo</span> /etc/init.d/dphys-swapfile stop
<span class="nb">sudo</span> /etc/init.d/dphys-swapfile start
free <span class="nt">-m</span> <span class="c"># to verify the swapfile size has been increased</span></code></pre></figure>
<p><strong>Step 2</strong> Build cython modules (optional)</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">$ </span>pip <span class="nb">install </span>Cython
<span class="nv">$ </span>make cython <span class="c"># You can set the python executable with `PYTHON` flag, e.g., make cython</span>
<span class="nv">PYTHON</span><span class="o">=</span>python3</code></pre></figure>
<p><em>MXNet</em> tries to use the cython modules unless the environment variable
<code>MXNET_ENABLE_CYTHON</code> is set to <code>0</code>.
If loading the cython modules fails, the default behavior is falling back to ctypes without
any warning. To
raise an exception at the failure, set the environment variable <code>MXNET_ENFORCE_CYTHON</code> to
<code>1</code>. See
<a href="https://mxnet.apache.org/api/faq/env_var">here</a> for more details.</p>
<p><strong>Step 3</strong> Install MXNet Python Bindings</p>
<p>To install Python bindings run the following commands in the MXNet directory:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">cd </span>python
pip <span class="nb">install</span> <span class="nt">--upgrade</span> pip
pip <span class="nb">install</span> <span class="nt">-e</span> .</code></pre></figure>
<p>Note that the <code>-e</code> flag is optional. It is equivalent to <code>--editable</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>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">ci/docker/runtime_functions.sh build_wheel python/ <span class="si">$(</span><span class="nb">realpath </span>build<span class="si">)</span></code></pre></figure>
<p>You are now ready to run MXNet on your Raspberry Pi device. You can get started by following
the tutorial on
<a href="https://mxnet.io/api/python/docs/tutorials/deploy/inference/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’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">
<h1 id="nvidia-jetson-devices">NVIDIA Jetson Devices</h1>
<p>To install MXNet on a Jetson TX or Nano, please refer to the <a href="/get_started/jetson_setup">Jetson installation
guide</a>.</p>
</div> <!-- End of jetson -->
</div> <!-- End of devices -->
</div>
</div>
</div>
</div>
</article>
</main><footer class="site-footer h-card">
<div class="wrapper">
<div class="row">
<div class="col-4">
<h4 class="footer-category-title">Resources</h4>
<ul class="contact-list">
<li><a href="/versions/1.9.1/community/contribute#mxnet-dev-communications">Mailing lists</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/MXNET/Apache+MXNet+Home">Developer Wiki</a></li>
<li><a href="https://issues.apache.org/jira/projects/MXNET/issues">Jira Tracker</a></li>
<li><a href="https://github.com/apache/mxnet/labels/Roadmap">Github Roadmap</a></li>
<li><a href="https://medium.com/apache-mxnet">Blog</a></li>
<li><a href="https://discuss.mxnet.io">Forum</a></li>
<li><a href="/versions/1.9.1/community/contribute">Contribute</a></li>
</ul>
</div>
<div class="col-4"><ul class="social-media-list"><li><a href="https://github.com/apache/mxnet"><svg class="svg-icon"><use xlink:href="/versions/1.9.1/assets/minima-social-icons.svg#github"></use></svg> <span class="username">apache/mxnet</span></a></li><li><a href="https://www.twitter.com/apachemxnet"><svg class="svg-icon"><use xlink:href="/versions/1.9.1/assets/minima-social-icons.svg#twitter"></use></svg> <span class="username">apachemxnet</span></a></li><li><a href="https://youtube.com/apachemxnet"><svg class="svg-icon"><use xlink:href="/versions/1.9.1/assets/minima-social-icons.svg#youtube"></use></svg> <span class="username">apachemxnet</span></a></li></ul>
</div>
<div class="col-4 footer-text">
<p>A flexible and efficient library for deep learning.</p>
</div>
</div>
</div>
</footer>
<footer class="site-footer2">
<div class="wrapper">
<div class="row">
<div class="col-3">
<img src="/versions/1.9.1/assets/img/asf_logo.svg" class="footer-logo col-2">
</div>
<div class="footer-bottom-warning col-9">
</p><p>"Copyright © 2017-2022, The Apache Software Foundation. Licensed under the Apache License, Version 2.0. 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>
</footer>
</body>
</html>