larroy commented on a change in pull request #14534: [DOC] Update ubuntu install instructions from source URL: https://github.com/apache/incubator-mxnet/pull/14534#discussion_r274218527
########## File path: docs/install/ubuntu_setup.md ########## @@ -170,44 +191,72 @@ If building on CPU and using OpenBLAS: ```bash git clone --recursive https://github.com/apache/incubator-mxnet.git cd incubator-mxnet - echo "USE_OPENCV = 1" >> ./config.mk - echo "USE_BLAS = openblas" >> ./config.mk - make -j $(nproc) +``` + + +```bash + rm -rf build + mkdir -p build && cd build + cmake -GNinja \ + -DUSE_CUDA=OFF \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + .. + ninja ``` If building on CPU and using MKL and MKL-DNN (make sure MKL is installed according to [Math Library Selection](build_from_source.html#math-library-selection) and [MKL-DNN README](https://github.com/apache/incubator-mxnet/blob/master/docs/tutorials/mkldnn/MKLDNN_README.md)): ```bash - git clone --recursive https://github.com/apache/incubator-mxnet.git - cd incubator-mxnet - echo "USE_OPENCV = 1" >> ./config.mk - echo "USE_BLAS = openblas" >> ./config.mk - echo "USE_CUDA = 0" >> ./config.mk - echo "USE_MKLDNN = 1" >> ./config.mk - make -j $(nproc) + rm -rf build + mkdir -p build && cd build + cmake -GNinja \ + -DUSE_CUDA=OFF \ + -DUSE_MKL_IF_AVAILABLE=ON \ + -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + .. + ninja ``` -If building on GPU and you want OpenCV and OpenBLAS (make sure you have installed the [CUDA dependencies first](#cuda-dependencies)): +If building on GPU (make sure you have installed the [CUDA dependencies first](#cuda-dependencies)): +Cuda 10.1 in Ubuntu 18.04 builds fine but is not currently tested in CI. ```bash - git clone --recursive https://github.com/apache/incubator-mxnet.git - cd incubator-mxnet - echo "USE_OPENCV = 1" >> ./config.mk - echo "USE_BLAS = openblas" >> ./config.mk - echo "USE_CUDA = 1" >> ./config.mk - echo "USE_CUDA_PATH = /usr/local/cuda" >> ./config.mk - echo "USE_CUDNN = 1" >> ./config.mk - make -j $(nproc) + rm -rf build + mkdir -p build && cd build + cmake -GNinja \ + -DUSE_CUDA=ON \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + .. + ninja ``` -*Note* - USE_OPENCV and USE_BLAS are make file flags to set compilation options to use OpenCV and BLAS library. You can explore and use more compilation options in `make/config.mk` and also review common [usage examples](build_from_source.html#usage-examples). +*Note* - You can explore and use more compilation options in `CMakeLists.txt` and also review common [usage examples](build_from_source.html#usage-examples). +You can also use a scripted version of the above with an editable CMake options file by doing the +following: + +```bash +cp cmake/cmake_options.yml . +# Edit to your taste +$EDITOR cmake_options.yml +# Launch a local CMake build +./dev_menu.py menu 1 Review comment: The instructions use CMake command line. this is just mentioning al alternative as the text above reads: "You can also use a scripted version of the above with an editable CMake options file by doing the following:" which is optional. I will mark it as optional alternative. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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