-
Notifications
You must be signed in to change notification settings - Fork 6.8k
added mac gpu install; refactored windows install #9353
Conversation
@JulianSlzr could you help review? |
docs/install/index.md
Outdated
3. Run `xcode-select --install` to install all command line tools, compilers, etc. | ||
|
||
4. Install CUDA for MacOS X. Specific steps are provided in NVIDIA's [CUDA installation instructions](https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#installation). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One must install cuDNN 7 for CUDA 9.1 separately. Link to http://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installmac and note that one will need to create a (free) NVIDIA account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll add some more helpful links for these steps.
docs/install/index.md
Outdated
|
||
8. Copy the `mxnet/make/osx.mk` to `mxnet/config.mk` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Work relative to being in mxnet/
, e.g., "Copy make/osx.mk
to config.mk
in the MXNet root directory."
docs/install/index.md
Outdated
USE_CUDA = 1 | ||
USE_CUDA_PATH = /usr/local/cuda | ||
USE_CUDNN = 1 | ||
USE_OPENCV = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users will probably be interested in using OpenCV (we don't even mention it as optional in the Linux instructions). Mention that one could do this if one has Homebrew, via brew tap homebrew/science; brew install opencv
.
In general, the install won't go through unless you have brew
or port
installed, along with dependencies like numpy
(which most users on the issue have implicitly done). I can confirm this on my own Mac+GPU install.
Really, the right thing to do would be to either:
- Tell the user to edit the build script we have for Mac OS X > CPU > Build from Source
- Roll a modified build script that sets environment variables then calls the build script above
- Be very explicit about packages we need to install, which is what we do for the Linux docs anyways. That is, go back to something like what we had in the past (https://mxnet.incubator.apache.org/get_started/osx_setup.html)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to have this conversation along with the source of these instructions: #9217
I was mostly trying to get the latest validated instructions presented and have the install selector actually work.
Also, I purposely avoided OpenCV because it is a can of worms and instructions depend on the version you want, so, overall, it can be a royal pain to get working, whereas a GPU build without OpenCV is much more easily attained.
Happy to add it if there is a validated build chain with specific versions of it mentioned. I'm afraid just switching to use_opencv=1
may break these instructions.
Regarding the custom script - again, that needs to be verified, and the old getting started seems pretty out of date... whereas this recent issue seems to be more current.
I think we should make a note of it and provide the brew instructions, but let this pass for now until we have validated instructions for opencv or a custom install script.
docs/install/index.md
Outdated
8. Copy the `mxnet/make/osx.mk` to `mxnet/config.mk` | ||
|
||
9. Run `make`. If you previously attempted to compile you might want to do make clean_all first. You can also run `make -j` with the number of processors you have to compile with multithreading. There'll be plenty of warnings, but there should be no errors. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write make clean_all
(i.e., with backticks)
docs/install/index.md
Outdated
9. Run `make`. If you previously attempted to compile you might want to do make clean_all first. You can also run `make -j` with the number of processors you have to compile with multithreading. There'll be plenty of warnings, but there should be no errors. | ||
|
||
10. Once finished, you should have a file called `libmxnet.so` in `mxnet/lib/`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...in lib/
(i.e., work relative from mxnet/
)
docs/install/index.md
Outdated
Next, we install ```graphviz``` library that we use for visualizing network graphs you build on MXNet. We will also install [Jupyter Notebook](http://jupyter.readthedocs.io/) used for running MXNet tutorials and examples. | ||
- Install ```graphviz``` by downloading MSI installer from [Graphviz Download Page](https://graphviz.gitlab.io/_pages/Download/Download_windows.html). | ||
**Note** Make sure to add graphviz executable path to PATH environment variable. Refer [here for more details](http://stackoverflow.com/questions/35064304/runtimeerror-make-sure-the-graphviz-executables-are-on-your-systems-path-aft) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definite articles! E.g., the graphviz
library, ... the MSI installer, ... the graphviz
executable, ... the PATH
environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure... this was all pre-existing content that I didn't really focus on, but let's fix it now!
@aaronmarkham would you address the review comments? |
@JulianSlzr is this good to go? |
@JulianSlzr mentioned that he would do a trial run and get back to us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the GPU install on a clean machine. My revisions somewhat differ from #9217 since users there aren't fully using brew
, from which e.g., opencv
can be installed. [This is why I do pip install
instead of using python setup.py
for example, as the latter will cryptically fail (numpy
's setup script isn't great on macOS; using pip
forces a .whl
download).]
Anyways, this is more consistent w/ the macOS CPU script and the Linux instructions. (Props to @poohlty for lending me his 2012 NVIDIA-powered MacBook.)
docs/install/index.md
Outdated
$ export PATH=/usr/local/bin:/usr/local/sbin:$PATH | ||
|
||
# Install python development tools - python2.7, pip, python-setuptools | ||
$ brew install python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the full line brew install python pkg-config graphviz
@@ -709,28 +732,32 @@ Alternatively, you may follow the [CUDA installation instructions for Mac OS X]( | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add step: Run sudo xcodebuild -license accept
to accept Xcode's licensing terms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
docs/install/index.md
Outdated
|
||
12. Run `sudo python setup.py install`. | ||
8. Run `sudo python setup.py install`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace this with sudo pip install -e .
(note that the .
is part of the command). You could furthermore copy the blurb that says "Note that the -e flag is optional" etc. from the Linux instructions.
docs/install/index.md
Outdated
``` | ||
|
||
**Step 3** Install CUDA and cuDNN | ||
|
||
The following instructions are for CUDA 9.1 and cuDNN 7 for MacOS X 10.12+ and a CUDA-capable GPU. They summarize confirmed successful builds in [#9217](https://github.com/apache/incubator-mxnet/issues/9217). | ||
Alternatively, you may follow the [CUDA installation instructions for Mac OS X](https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direct URL to Xcode 8.3.3 below will silently fail if you're not logged in. Better to link to https://developer.apple.com/download/more/, as it'll prompt you if you need to log in with your Apple ID.
docs/install/index.md
Outdated
@@ -709,28 +732,32 @@ Alternatively, you may follow the [CUDA installation instructions for Mac OS X]( | |||
|
|||
4. Install CUDA for MacOS X. Specific steps are provided in NVIDIA's [CUDA installation instructions](https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#installation). | |||
|
|||
5. Run `git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet` to get the latest version. | |||
5. [Download](http://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#download-mac) and [install](http://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installmac) cuDNN for MacOS X. You will need to [create a free developer account](https://developer.nvidia.com/accelerated-computing-developer) with NVIDIA prior to getting the download link. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, it's just "macOS" these days (I noticed the CPU instructions already did this). Let's replace the various instances of "MacOS X" / "Mac OS X" with that. Sorry!
Thanks for the changes, looks good to me. |
* added mac gpu install; refactored windows install * resolving comments * resolving comments on mac install * added ticks for a xcode-select command
* added mac gpu install; refactored windows install * resolving comments * resolving comments on mac install * added ticks for a xcode-select command
* added mac gpu install; refactored windows install * resolving comments * resolving comments on mac install * added ticks for a xcode-select command
* added mac gpu install; refactored windows install * resolving comments * resolving comments on mac install * added ticks for a xcode-select command
Description
The install page is far from ideal - super difficult to maintain - but this should at least improve usability.
Checklist
Essentials
make lint
)Out of the scope of this PR.
Changes
Comments
Documents #9217 for at least a non-OpenCV build. Mac + GPU + OpenCV is uncertain.
Fixes #9146 (broken selector)
Existing PR #8619 - will need to rebase with this update and should probably just add updated installation info to the existing section in this file instead of the separate windows_setup.md file.
Windows CPU Build From Source needs validation and improved information since the existing docs really seem to focus on GPU builds only.