aaronmarkham commented on a change in pull request #8578: Add development instructions and update installation instructions URL: https://github.com/apache/incubator-mxnet/pull/8578#discussion_r149699813
########## File path: DEVELOPMENT.md ########## @@ -0,0 +1,69 @@ +# Developing MXNet + +## Build MXNet from source with CMake + +It's recommended that you install CMake and Ninja. + +Chose the options that you want to compile with in a similar fashion as above. In particular this one is a debug CPU +build in OSx. + +``` +mkdir build && cd build +cmake -DUSE_CUDA=OFF -DUSE_OPENCV=OFF -DUSE_OPENMP=OFF -DCMAKE_BUILD_TYPE=Debug -GNinja .. +ninja +``` +You can check the available CMake options in CMakeLists.txt file: `cat CMakeLists.txt | grep mxnet_option`. Similar +options are needed if you want to use CLion. Under settings you can modify the CMake options so code navigation and +build works. + +Then you can use the library and install with pip. It's recommended that you use a python virtualenv or similar tool for having multiple +installed versions and managing the python interpreter. + +``` +virtualenv -p /usr/bin/python3.5 py3 +source py3/bin/activate +``` + +``` +cp build/libmxnet.* ../python/mxnet +cd python/mxnet +pip3 install -e . +``` + +## Building in Ubuntu 17.04 with CUDA + +Not all combinations of host C++ compiler and nvcc are supported + +[cuda installation guide](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#axzz4lB5unFj4) + +For Ubuntu 17.04 a solution is to explicitly set g++-4.9 and setting CCBIN as well: + +``` +sudo apt-get install -y g++-4.9 nvidia-cuda-dev nvidia-cuda-toolkit cmake ninja-build +CC=gcc-4.9 CXX=g++-4.9 CCBIN=g++-4.9 cmake -DUSE_CUDA=ON -DUSE_LAPACK=OFF\ + -DUSE_MKL_IF_AVAILABLE=OFF -DCUDA_VERBOSE_BUILD:BOOL=ON -GNinja .. +ninja -v +``` + +## Building in Mac + +For building in mac you can install cmake, ninja and openblas with [homebrew](https://brew.sh/) and +use one of the above cmake configurations. Review comment: "one of the above" - shouldn't use above and below generally, and in this case I'm not sure what you mean anyway. Probably this one: `+cmake -DUSE_CUDA=OFF -DUSE_OPENCV=OFF -DUSE_OPENMP=OFF -DCMAKE_BUILD_TYPE=Debug -GNinja ..`. If I used the second one it would probably fail because of the cuda flag. If it is important why not repeat it specifically? Or better yet, provide different options that someone would dev with vs. just have a debug build. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services