You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/get_started/osx_setup.md
+58-17Lines changed: 58 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,27 +39,68 @@ Install the dependencies, required for MXNet, with the following commands:
39
39
```
40
40
After you have installed the dependencies, use one of the following options to pull the MXNet source code from Git and build MXNet. Both options produce a library called ```libmxnet.so```.
41
41
42
+
### Prepare Environment for GPU Installation
43
+
44
+
If you plan to build with GPU, you need to set up environemtn for CUDA and cuDNN.
45
+
46
+
First download and install [CUDA 8 toolkit](https://developer.nvidia.com/cuda-toolkit).
47
+
48
+
Once you have the CUDA Toolkit installed you will need to setup the required environment variables by adding the following to your ~/.bash_profile file:
**Option 1** Use the following commands to pull MXNet source code and build MXNet. The file called ```osx.mk``` has the configuration required for building MXNet on OS X. First copy ```make/osx.mk``` into ```config.mk```, which is used by the ```make``` command:
**Note:** To change build parameters, edit ```config.mk```.
55
96
56
97
**Option 2**
57
98
To generate an [Xcode](https://en.wikipedia.org/wiki/Xcode) project from MXNet source code, use the ```cmake``` command. Then, build MXNet using the Xcode IDE.
**Note:** R-package is a folder in the MXNet source.
@@ -179,15 +220,15 @@ For more details about installing and using MXNet with Julia, see the [MXNet Jul
179
220
Before you build MXNet for Scala from source code, you must complete [building the shared library](#build-the-shared-library). After you build the shared library, run the following command from the MXNet source root directory to build the MXNet Scala package:
180
221
181
222
```bash
182
-
make scalapkg
223
+
make scalapkg
183
224
```
184
225
185
226
This command creates the JAR files for the assembly, core, and example modules. It also creates the native library in the ```native/{your-architecture}/target directory```, which you can use to cooperate with the core module.
186
227
187
228
To install the MXNet Scala package into your local Maven repository, run the following command from the MXNet source root directory:
Copy file name to clipboardExpand all lines: docs/get_started/ubuntu_setup.md
+78-31Lines changed: 78 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,30 +3,62 @@ MXNet currently supports Python, R, Julia, and Scala. For users of Python and R
3
3
4
4
The simple installation scripts set up MXNet for Python and R on computers running Ubuntu 12 or later. The scripts install MXNet in your home folder ```~/mxnet```.
5
5
6
+
## Prepare environment for GPU Installation
7
+
8
+
If you plan to build with GPU, you need to set up environemtn for CUDA and CUDNN.
9
+
10
+
First download and install [CUDA 8 toolkit](https://developer.nvidia.com/cuda-toolkit).
11
+
12
+
Then download [cudnn 5](https://developer.nvidia.com/cudnn).
13
+
14
+
Unzip the file and change to cudnn root directory. Move the header and libraries to your local CUDA Toolkit folder:
To clone the MXNet source code repository to your computer, use ```git```.
10
34
```bash
11
-
# Install git if not already installed.
12
-
sudo apt-get update
13
-
sudo apt-get -y install git
35
+
# Install git if not already installed.
36
+
sudo apt-get update
37
+
sudo apt-get -y install git
14
38
```
15
39
16
40
Clone the MXNet source code repository to your computer, run the installation script, and refresh the environment variables. In addition to installing MXNet, the script installs all MXNet dependencies: ```Numpy```, ```LibBLAS``` and ```OpenCV```.
17
41
It takes around 5 minutes to complete the installation.
18
42
19
43
```bash
20
-
# Clone mxnet repository. In terminal, run the commands WITHOUT "sudo"
# If building with GPU, add configurations to config.mk file:
48
+
cd~/mxnet
49
+
cp make/config.mk .
50
+
echo"USE_CUDA=1">>config.mk
51
+
echo"USE_CUDA_PATH=/usr/local/cuda">>config.mk
52
+
echo"USE_CUDNN=1">>config.mk
53
+
echo"USE_DIST_KVSTORE=1">>config.mk
54
+
55
+
# Install MXNet for Python with all required dependencies
56
+
cd~/mxnet/setup-utils
57
+
bash install-mxnet-ubuntu-python.sh
58
+
59
+
# We have added MXNet Python package path in your ~/.bashrc.
60
+
# Run the following command to refresh environment variables.
61
+
$ source~/.bashrc
30
62
```
31
63
32
64
You can view the installation script we just used to install MXNet for Python [here](https://raw.githubusercontent.com/dmlc/mxnet/master/setup-utils/install-mxnet-ubuntu-python.sh).
@@ -36,8 +68,8 @@ You can view the installation script we just used to install MXNet for Python [h
36
68
To install MXNet for R:
37
69
38
70
```bash
39
-
cd~/mxnet/setup-utils
40
-
bash install-mxnet-ubuntu-r.sh
71
+
cd~/mxnet/setup-utils
72
+
bash install-mxnet-ubuntu-r.sh
41
73
```
42
74
The installation script to install MXNet for R can be found [here](https://raw.githubusercontent.com/dmlc/mxnet/master/setup-utils/install-mxnet-ubuntu-r.sh).
43
75
@@ -63,15 +95,30 @@ On Ubuntu versions 13.10 or later, you need the following dependencies:
63
95
Install these dependencies using the following commands:
**Note:** R-package is a folder in the MXNet source.
109
156
110
157
These commands create the MXNet R package as a tar.gz file that you can install as an R package. To install the R package, run the following command, use your MXNet version number:
111
158
112
159
```bash
113
-
R CMD INSTALL mxnet_0.7.tar.gz
160
+
R CMD INSTALL mxnet_0.7.tar.gz
114
161
```
115
162
116
163
### Install the MXNet Package for Julia
117
164
118
165
The MXNet package for Julia is hosted in a separate repository, MXNet.jl, which is available on [GitHub](https://github.com/dmlc/MXNet.jl). To use Julia binding it with an existing libmxnet installation, set the ```MXNET_HOME``` environment variable by running the following command:
119
166
120
167
```bash
121
-
export MXNET_HOME=/<path to>/libmxnet
168
+
export MXNET_HOME=/<path to>/libmxnet
122
169
```
123
170
124
171
The path to the existing libmxnet installation should be the root directory of libmxnet. In other words, you should be able to find the ```libmxnet.so``` file at ```$MXNET_HOME/lib```. For example, if the root directory of libmxnet is ```~```, you would run the following command:
125
172
126
173
```bash
127
-
export MXNET_HOME=/~/libmxnet
174
+
export MXNET_HOME=/~/libmxnet
128
175
```
129
176
130
177
You might want to add this command to your ```~/.bashrc``` file. If you do, you can install the Julia package in the Julia console using the following command:
131
178
132
179
```julia
133
-
Pkg.add("MXNet")
180
+
Pkg.add("MXNet")
134
181
```
135
182
136
183
For more details about installing and using MXNet with Julia, see the [MXNet Julia documentation](http://dmlc.ml/MXNet.jl/latest/user-guide/install/).
@@ -177,15 +224,15 @@ If your native environment differs slightly from the assembly package, for examp
177
224
Before you build MXNet for Scala from source code, you must complete [building the shared library](#build-the-shared-library). After you build the shared library, run the following command from the MXNet source root directory to build the MXNet Scala package:
178
225
179
226
```bash
180
-
make scalapkg
227
+
make scalapkg
181
228
```
182
229
183
230
This command creates the JAR files for the assembly, core, and example modules. It also creates the native library in the ```native/{your-architecture}/target directory```, which you can use to cooperate with the core module.
184
231
185
232
To install the MXNet Scala package into your local Maven repository, run the following command from the MXNet source root directory:
186
233
187
234
```bash
188
-
make scalainstall
235
+
make scalainstall
189
236
```
190
237
191
238
**Note - ** You are more than welcome to contribute easy installation scripts for other operating systems and programming languages, see [community page](http://mxnet.io/community/index.html) for contributors guidelines.
0 commit comments