Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit dd14c81

Browse files
authored
refine Nano setup directions (#15524)
* refine directions * resolving feedback on instructions
1 parent 9983adb commit dd14c81

File tree

1 file changed

+35
-31
lines changed

1 file changed

+35
-31
lines changed

docs/install/install-jetson.md

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919

2020
MXNet supports the Ubuntu Arch64 based operating system so you can run MXNet on NVIDIA Jetson Devices, such as the [TX2](http://www.nvidia.com/object/embedded-systems-dev-kits-modules.html) or [Nano](https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit).
2121

22-
These instructions will walk through how to build MXNet and install MXNet's Python language binding.
22+
These instructions will walk through how to build MXNet and install MXNet's Python language binding.
2323

2424
For the purposes of this install guide we will assume that CUDA is already installed on your Jetson device. The disk image provided by NVIDIA's getting started guides will have the Jetson toolkit preinstalled, and this also includes CUDA. You should double check what versions are installed and which version you plan to use.
2525

26-
You have several options for installing MXNet:
27-
1. Use a Jetson MXNet pip wheel for Python development.
28-
2. Use precompiled Jetson MXNet binaries.
26+
After installing the prerequisites, you have several options for installing MXNet:
27+
1. Use a Jetson MXNet pip wheel for Python development and use a precompiled Jetson MXNet binary.
2928
3. Build MXNet from source
3029
* On a faster Linux computer using cross-compilation
3130
* On the Jetson itself (very slow and not recommended)
@@ -35,7 +34,7 @@ You have several options for installing MXNet:
3534
To build from source or to use the Python wheel, you must install the following dependencies on your Jetson.
3635
Cross-compiling will require dependencies installed on that machine as well.
3736

38-
### Python API
37+
### Python Dependencies
3938

4039
To use the Python API you need the following dependencies:
4140

@@ -60,49 +59,54 @@ sudo pip install \
6059
```
6160

6261
If you plan to cross-compile you will need to install these dependencies on that computer as well.
62+
If you get an error about something being busy, you can restart the Nano and this error will go away. You can then continue installation of the prerequisites.
6363

64-
### Configure CUDA
64+
### Download the source & setup some environment variables:
6565

66-
You can check to see what version of CUDA is running with `nvcc`.
66+
These steps are optional, but some of the following instructions expect MXNet source files and the `MXNET_HOME` environment variable. Also, CUDA commands will not work out of the box without updating your path.
67+
68+
Clone the MXNet source code repository using the following `git` command in your home directory:
6769

6870
```bash
69-
nvcc --version
71+
git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
7072
```
7173

72-
To switch CUDA versions on a device or computer that has more than one version installed, use the following and replace the version as appropriate.
74+
Setup your environment variables for MXNet and CUDA in your `.profile` file in your home directory.
75+
Add the following to the file.
7376

7477
```bash
75-
sudo rm /usr/local/cuda
76-
sudo ln -s /usr/local/cuda-10.0 /usr/local/cuda
78+
export PATH=/usr/local/cuda/bin:$PATH
79+
export MXNET_HOME=$HOME/mxnet/
80+
export PYTHONPATH=$MXNET_HOME/python:$PYTHONPATH
7781
```
7882

79-
**Note:** When cross-compiling, change the CUDA version on the host computer you're using to match the version you're running on your Jetson device.
80-
**Note:** CUDA 10.1 is recommended but doesn't ship with the Nano's SD card image. You may want to go through CUDA upgrade steps first.
83+
You can then apply this change immediately with the following:
84+
```bash
85+
source .profile
86+
```
8187

82-
### Download the source & setup some environment variables:
88+
**Note:** Change the `~/.profile` steps according to how you prefer to use your shell. Otherwise, your environment variables will be gone after you logout.
8389

84-
These steps are optional, but some of the following instructions expect MXNet source files and the `MXNET_HOME` environment variable.
90+
### Configure CUDA
8591

86-
Clone the MXNet source code repository using the following `git` command in your home directory:
92+
You can check to see what version of CUDA is running with `nvcc`.
8793

8894
```bash
89-
git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
90-
cd mxnet
95+
nvcc --version
9196
```
9297

93-
Setup your environment variables for MXNet.
98+
To switch CUDA versions on a device or computer that has more than one version installed, use the following and replace the symbolic link to the version you want. This one uses CUDA 10.0, which is preinstalled on the Nano.
9499

95100
```bash
96-
cd ..
97-
export MXNET_HOME=$(pwd)
98-
echo "export PYTHONPATH=$MXNET_HOME/python:$PYTHONPATH" >> ~/.rc
99-
source ~/.rc
101+
sudo rm /usr/local/cuda
102+
sudo ln -s /usr/local/cuda-10.0 /usr/local/cuda
100103
```
101104

102-
**Note:** Change the `~/.rc` steps according to how you prefer to use your shell. Otherwise, your environment variables will be gone after you logout.
105+
**Note:** When cross-compiling, change the CUDA version on the host computer you're using to match the version you're running on your Jetson device.
106+
**Note:** CUDA 10.1 is recommended but doesn't ship with the Nano's SD card image. You may want to go through CUDA upgrade steps first.
103107

104108

105-
## Install MXNet for Python
109+
## Option 1. Install MXNet for Python
106110

107111
To use a prepared Python wheel, download it to your Jetson, and run it.
108112
* [MXNet 1.4.0 - Python 3](https://s3.us-east-2.amazonaws.com/mxnet-public/install/jetson/1.4.0/mxnet-1.4.0-cp36-cp36m-linux_aarch64.whl)
@@ -113,12 +117,10 @@ It should download the required dependencies, but if you have issues,
113117
install the dependencies in the prerequisites section, then run the pip wheel.
114118

115119
```bash
116-
sudo pip install mxnet-1.4.0-cp36-cp36m-linux_aarch64.whl
120+
sudo pip install mxnet-1.4.0-cp27-cp27mu-linux_aarch64.whl
117121
```
118122

119-
## Use a Pre-compiled MXNet Binary
120-
121-
If you want to just use a pre-compiled binary you can download it from S3:
123+
Now use a pre-compiled binary you can download it from S3 which is a patch v1.4.1:
122124
* https://s3.us-east-2.amazonaws.com/mxnet-public/install/jetson/1.4.1/libmxnet.so
123125

124126
Place this file in `$MXNET_HOME/lib`.
@@ -128,12 +130,14 @@ To use this with the MXNet Python binding, you must match the source directory's
128130
```bash
129131
cd $MXNET_HOME
130132
git checkout v1.4.x
131-
git submodule update --init
133+
git submodule update --init --recursive
132134
cd python
133135
sudo pip install -e .
134136
```
135137

136-
## Build MXNet from Source
138+
Refer to the following Conclusion and Next Steps section to test your installation.
139+
140+
## Option 2. Build MXNet from Source
137141

138142
Installing MXNet from source is a two-step process:
139143

0 commit comments

Comments
 (0)