You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/01/06 19:53:12 UTC

[GitHub] [incubator-mxnet] leezu opened a new pull request #17229: Fix and clean up Ubuntu build from source instructions

leezu opened a new pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229
 
 
   ## Description ##
   Fix and clean up Ubuntu build from source instructions.
   
   Fixes https://github.com/apache/incubator-mxnet/issues/17226
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [X] Changes are complete (i.e. I finished coding on this PR)
   - [X] All changes have test coverage:
   - Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
   - Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
   - Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
   - [X] Code is well-documented: 
   - For user-facing API changes, API doc string has been updated. 
   - For new C++ functions in header files, their functionalities and arguments are documented. 
   - For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
   - Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [X] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [X] Simplify and fix Ubuntu build from source instructions
   
   ## Comments ##
   Justification for respective removals
   - Binary Python install instructions: 1) The instructions were outdated and incomplete 2) This is a "Build From Source Guide". Why include binary package install instructions? 3) There are better instructions for the binary python install at the Get Started Page. Thus link to that page instead.
   - `ci/docker/install/ubuntu_{core,python}.sh` "quick" install: 1) https://github.com/apache/incubator-mxnet/issues/17226 2) Only supports Ubuntu 16.04
   - `./install_mxnet_ubuntu_python.sh`: Does not exist anymore
   - `dev_menu.py build`: The `dev_menu.py build` does things differently compared to the simple build instructions in this tutorial. For example, it uses virtualenv and contains other unrelated features such as building docker containers. I think it adds confusion for new users if we include it in the setup guide.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] apeforest commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
apeforest commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#discussion_r363903389
 
 

 ##########
 File path: docs/static_site/src/pages/get_started/ubuntu_setup.md
 ##########
 @@ -234,13 +140,13 @@ If building on CPU and using MKL and MKL-DNN (make sure MKL is installed accordi
     ninja
 ```
 
-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.
+For a GPU-enabled build make sure you have installed the
+[CUDA dependencies first](#cuda-dependencies)) and run:
 
 ```bash
     rm -rf build
     mkdir -p build && cd build
-    cmake -GNinja \
+    ~/.local/bin/cmake -GNinja \
 
 Review comment:
   Is this path to cmake required?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571797182
 
 
   @ptrendx isn't the website built from 1.6 branch? I agree it's not necessary to include the change in the release, but could be good to include for the website.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571612397
 
 
   There were multiple separate instructions. One of them are the CI scripts and those were verified. Other's were not verified and one of them was broken (`./install_mxnet_ubuntu_python.sh` doesn't exist anymore).
   
   However, the CI scripts contain CI specific code and shouldn't be used on user systems.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] apeforest commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
apeforest commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#discussion_r365391576
 
 

 ##########
 File path: docs/static_site/src/pages/get_started/ubuntu_setup.md
 ##########
 @@ -147,67 +81,35 @@ On Ubuntu versions 16.04 or later, you need the following dependencies:
 **Step 1:** Install prerequisite packages.
 ```bash
     sudo apt-get update
-    sudo apt-get install -y build-essential git ninja-build ccache
-```
-
-**For Ubuntu 18.04 and CUDA builds you need to update CMake**
-
-```bash
-#!/usr/bin/env bash
-set -exuo pipefail
-sudo apt remove --purge --auto-remove cmake
-
-# Update CMAKE for correct cuda autotedetection: https://github.com/clab/dynet/issues/1457
-version=3.14
-build=0
-mkdir -p ~/tmp
-cd ~/tmp
-wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
-tar -xzvf cmake-$version.$build.tar.gz
-cd cmake-$version.$build/
-./bootstrap
-make -j$(nproc)
-sudo make install
+    sudo apt-get install -y build-essential git ninja-build ccache python3-pip libopenblas-dev libopencv-dev
+    pip3 install --user --upgrade "cmake>=3.13.2"  # Instead of using pip, you could also manually install cmake from https://cmake.org
 ```
 
+Instead of `libopenblas-dev` you may also choose a different math library.
+Further information is provided in the source guide's [Math Library
+Selection](build_from_source#math-library-selection) section.
 
-**Step 2:** Install a Math Library.
+`libopencv-dev` is an optional dependency. You can delete it from above `apt-get
+install` line and build MXNet without OpenCV support by passing
+`-DUSE_OPENCV=OFF` to the `cmake` command below.
 
-Details on the different math libraries are found in the build from source guide's [Math Library Selection](build_from_source#math-library-selection) section.
-
-For OpenBLAS use:
-
-```bash
-    sudo apt-get install -y libopenblas-dev
-```
-
-For other libraries, visit the [Math Library Selection](build_from_source#math-library-selection) section.
-
-**Step 3:** Install OpenCV.
-
-*MXNet* uses [OpenCV](http://opencv.org/) for efficient image loading and augmentation operations.
-
-```bash
-    sudo apt-get install -y libopencv-dev
-```
-
-**Step 4:** Download MXNet sources and build MXNet core shared library.
-
-If building on CPU and using OpenBLAS:
+**Step 2:** Download MXNet sources
 
 Clone the repository:
 
 ```bash
-    git clone --recursive https://github.com/apache/incubator-mxnet.git
-    cd incubator-mxnet
+    git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
+    cd mxnet
 ```
 
-Build with CMake and ninja, without GPU and without MKL.
+**Step 3:** Build MXNet core shared library.
+
+For a CPU-only build with OpenBLAS math library run:
 
 ```bash
     rm -rf build
     mkdir -p build && cd build
-    cmake -GNinja \
+    ~/.local/bin/cmake -GNinja \
 
 Review comment:
   Somehow I found using this absolute path causes inconvenience as my 'cmake' is not installed on this path, nor is the default one on AWS DLAMI. So I can't just copy and paste this command to build mxnet. Do you have a better idea to not using a fixed path?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] larroy commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
larroy commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#discussion_r365478112
 
 

 ##########
 File path: docs/static_site/src/pages/get_started/ubuntu_setup.md
 ##########
 @@ -147,67 +81,35 @@ On Ubuntu versions 16.04 or later, you need the following dependencies:
 **Step 1:** Install prerequisite packages.
 ```bash
     sudo apt-get update
-    sudo apt-get install -y build-essential git ninja-build ccache
-```
-
-**For Ubuntu 18.04 and CUDA builds you need to update CMake**
-
-```bash
-#!/usr/bin/env bash
-set -exuo pipefail
-sudo apt remove --purge --auto-remove cmake
-
-# Update CMAKE for correct cuda autotedetection: https://github.com/clab/dynet/issues/1457
-version=3.14
-build=0
-mkdir -p ~/tmp
-cd ~/tmp
-wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
-tar -xzvf cmake-$version.$build.tar.gz
-cd cmake-$version.$build/
-./bootstrap
-make -j$(nproc)
-sudo make install
+    sudo apt-get install -y build-essential git ninja-build ccache python3-pip libopenblas-dev libopencv-dev
+    pip3 install --user --upgrade "cmake>=3.13.2"  # Instead of using pip, you could also manually install cmake from https://cmake.org
 ```
 
+Instead of `libopenblas-dev` you may also choose a different math library.
+Further information is provided in the source guide's [Math Library
+Selection](build_from_source#math-library-selection) section.
 
-**Step 2:** Install a Math Library.
+`libopencv-dev` is an optional dependency. You can delete it from above `apt-get
+install` line and build MXNet without OpenCV support by passing
+`-DUSE_OPENCV=OFF` to the `cmake` command below.
 
-Details on the different math libraries are found in the build from source guide's [Math Library Selection](build_from_source#math-library-selection) section.
-
-For OpenBLAS use:
-
-```bash
-    sudo apt-get install -y libopenblas-dev
-```
-
-For other libraries, visit the [Math Library Selection](build_from_source#math-library-selection) section.
-
-**Step 3:** Install OpenCV.
-
-*MXNet* uses [OpenCV](http://opencv.org/) for efficient image loading and augmentation operations.
-
-```bash
-    sudo apt-get install -y libopencv-dev
-```
-
-**Step 4:** Download MXNet sources and build MXNet core shared library.
-
-If building on CPU and using OpenBLAS:
+**Step 2:** Download MXNet sources
 
 Clone the repository:
 
 ```bash
-    git clone --recursive https://github.com/apache/incubator-mxnet.git
-    cd incubator-mxnet
+    git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
+    cd mxnet
 ```
 
-Build with CMake and ninja, without GPU and without MKL.
+**Step 3:** Build MXNet core shared library.
+
+For a CPU-only build with OpenBLAS math library run:
 
 ```bash
     rm -rf build
     mkdir -p build && cd build
-    cmake -GNinja \
+    ~/.local/bin/cmake -GNinja \
 
 Review comment:
   it would be better to just use CMake and specify what's the minimum required version

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] szha commented on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
szha commented on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571610114
 
 
   Is the verification of this instruction not automated? I thought we had automatic verification for it which wouldn't allow it to be broken

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] apeforest commented on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
apeforest commented on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571728610
 
 
   Thanks a lot for cleaning up this instruction. The current one is so confusing and not working as well. 
   
   One more thing is that I found current CMake still not working perfectly.
   e.g. if I add flag -DUSE_NCCL, it does not work. I have to use `make` if I want to use NCCL with CUDA. 
   Also, it's not very user-friendly to type all different flags of cmake. It would be nice to have a setup.py like pytorch.
   
   I have a feature request here: https://github.com/apache/incubator-mxnet/issues/17180

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] apeforest edited a comment on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
apeforest edited a comment on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571728610
 
 
   Thanks a lot for cleaning up this instruction. The current one is so confusing and not working as well. 
   
   One more thing is that I found current CMake still not working perfectly.
   e.g. if I add flag -DUSE_NCCL, it does not work. I have to use `make` if I want to use NCCL with CUDA. 
   Issue: https://github.com/apache/incubator-mxnet/issues/17239
   Also, it's not very user-friendly to type all different flags of cmake. It would be nice to have a setup.py like pytorch.
   
   I have a feature request here: https://github.com/apache/incubator-mxnet/issues/17180

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#discussion_r365510911
 
 

 ##########
 File path: docs/static_site/src/pages/get_started/ubuntu_setup.md
 ##########
 @@ -147,67 +81,35 @@ On Ubuntu versions 16.04 or later, you need the following dependencies:
 **Step 1:** Install prerequisite packages.
 ```bash
     sudo apt-get update
-    sudo apt-get install -y build-essential git ninja-build ccache
-```
-
-**For Ubuntu 18.04 and CUDA builds you need to update CMake**
-
-```bash
-#!/usr/bin/env bash
-set -exuo pipefail
-sudo apt remove --purge --auto-remove cmake
-
-# Update CMAKE for correct cuda autotedetection: https://github.com/clab/dynet/issues/1457
-version=3.14
-build=0
-mkdir -p ~/tmp
-cd ~/tmp
-wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
-tar -xzvf cmake-$version.$build.tar.gz
-cd cmake-$version.$build/
-./bootstrap
-make -j$(nproc)
-sudo make install
+    sudo apt-get install -y build-essential git ninja-build ccache python3-pip libopenblas-dev libopencv-dev
+    pip3 install --user --upgrade "cmake>=3.13.2"  # Instead of using pip, you could also manually install cmake from https://cmake.org
 ```
 
+Instead of `libopenblas-dev` you may also choose a different math library.
+Further information is provided in the source guide's [Math Library
+Selection](build_from_source#math-library-selection) section.
 
-**Step 2:** Install a Math Library.
+`libopencv-dev` is an optional dependency. You can delete it from above `apt-get
+install` line and build MXNet without OpenCV support by passing
+`-DUSE_OPENCV=OFF` to the `cmake` command below.
 
-Details on the different math libraries are found in the build from source guide's [Math Library Selection](build_from_source#math-library-selection) section.
-
-For OpenBLAS use:
-
-```bash
-    sudo apt-get install -y libopenblas-dev
-```
-
-For other libraries, visit the [Math Library Selection](build_from_source#math-library-selection) section.
-
-**Step 3:** Install OpenCV.
-
-*MXNet* uses [OpenCV](http://opencv.org/) for efficient image loading and augmentation operations.
-
-```bash
-    sudo apt-get install -y libopencv-dev
-```
-
-**Step 4:** Download MXNet sources and build MXNet core shared library.
-
-If building on CPU and using OpenBLAS:
+**Step 2:** Download MXNet sources
 
 Clone the repository:
 
 ```bash
-    git clone --recursive https://github.com/apache/incubator-mxnet.git
-    cd incubator-mxnet
+    git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
+    cd mxnet
 ```
 
-Build with CMake and ninja, without GPU and without MKL.
+**Step 3:** Build MXNet core shared library.
+
+For a CPU-only build with OpenBLAS math library run:
 
 ```bash
     rm -rf build
     mkdir -p build && cd build
-    cmake -GNinja \
+    ~/.local/bin/cmake -GNinja \
 
 Review comment:
   @larroy some users may not know how to understand cmake.
   @apeforest DLAMI encourages users to use conda, which causes problems for above installation steps.
   
   I'll open a PR to improve the experience shortly

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] ptrendx commented on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
ptrendx commented on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571785200
 
 
   Website lives kind of on its own anyway, so there is no need to include this change in 1.6 package for it to apply to 1.6 release. I would be against including things that are not essential as it is very easy to just get into this loop of adding new shiny things one after another and never actually releasing the thing.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571733394
 
 
   @ptrendx This PR may be nice to backport to 1.6. What do you think? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] larroy commented on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
larroy commented on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571683909
 
 
   @szha I'm not aware of such automation, I think there's something for notebooks / tutorials, not for installation instructions. I could be wrong.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu merged pull request #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
leezu merged pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#discussion_r363908711
 
 

 ##########
 File path: docs/static_site/src/pages/get_started/ubuntu_setup.md
 ##########
 @@ -234,13 +140,13 @@ If building on CPU and using MKL and MKL-DNN (make sure MKL is installed accordi
     ninja
 ```
 
-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.
+For a GPU-enabled build make sure you have installed the
+[CUDA dependencies first](#cuda-dependencies)) and run:
 
 ```bash
     rm -rf build
     mkdir -p build && cd build
-    cmake -GNinja \
+    ~/.local/bin/cmake -GNinja \
 
 Review comment:
   Yes, because we use pip install --user to install an up-to-date cmake. Often ~/.local/bin will be part of user's PATH. But it's not guaranteed and not true on default Ubuntu installation. So it's safer to specify the complete path. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu edited a comment on issue #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#issuecomment-571612397
 
 
   There were multiple separate instructions. One of them are the CI scripts and those were verified. Other's were not verified and one of them was broken (`./install_mxnet_ubuntu_python.sh` doesn't exist anymore).
   
   However, the CI scripts contain CI specific code and shouldn't be used on user systems. Thus they are removed with this PR and replaced by a simplified 3 step process.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] apeforest commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions

Posted by GitBox <gi...@apache.org>.
apeforest commented on a change in pull request #17229: Fix and clean up Ubuntu build from source instructions
URL: https://github.com/apache/incubator-mxnet/pull/17229#discussion_r365391576
 
 

 ##########
 File path: docs/static_site/src/pages/get_started/ubuntu_setup.md
 ##########
 @@ -147,67 +81,35 @@ On Ubuntu versions 16.04 or later, you need the following dependencies:
 **Step 1:** Install prerequisite packages.
 ```bash
     sudo apt-get update
-    sudo apt-get install -y build-essential git ninja-build ccache
-```
-
-**For Ubuntu 18.04 and CUDA builds you need to update CMake**
-
-```bash
-#!/usr/bin/env bash
-set -exuo pipefail
-sudo apt remove --purge --auto-remove cmake
-
-# Update CMAKE for correct cuda autotedetection: https://github.com/clab/dynet/issues/1457
-version=3.14
-build=0
-mkdir -p ~/tmp
-cd ~/tmp
-wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
-tar -xzvf cmake-$version.$build.tar.gz
-cd cmake-$version.$build/
-./bootstrap
-make -j$(nproc)
-sudo make install
+    sudo apt-get install -y build-essential git ninja-build ccache python3-pip libopenblas-dev libopencv-dev
+    pip3 install --user --upgrade "cmake>=3.13.2"  # Instead of using pip, you could also manually install cmake from https://cmake.org
 ```
 
+Instead of `libopenblas-dev` you may also choose a different math library.
+Further information is provided in the source guide's [Math Library
+Selection](build_from_source#math-library-selection) section.
 
-**Step 2:** Install a Math Library.
+`libopencv-dev` is an optional dependency. You can delete it from above `apt-get
+install` line and build MXNet without OpenCV support by passing
+`-DUSE_OPENCV=OFF` to the `cmake` command below.
 
-Details on the different math libraries are found in the build from source guide's [Math Library Selection](build_from_source#math-library-selection) section.
-
-For OpenBLAS use:
-
-```bash
-    sudo apt-get install -y libopenblas-dev
-```
-
-For other libraries, visit the [Math Library Selection](build_from_source#math-library-selection) section.
-
-**Step 3:** Install OpenCV.
-
-*MXNet* uses [OpenCV](http://opencv.org/) for efficient image loading and augmentation operations.
-
-```bash
-    sudo apt-get install -y libopencv-dev
-```
-
-**Step 4:** Download MXNet sources and build MXNet core shared library.
-
-If building on CPU and using OpenBLAS:
+**Step 2:** Download MXNet sources
 
 Clone the repository:
 
 ```bash
-    git clone --recursive https://github.com/apache/incubator-mxnet.git
-    cd incubator-mxnet
+    git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
+    cd mxnet
 ```
 
-Build with CMake and ninja, without GPU and without MKL.
+**Step 3:** Build MXNet core shared library.
+
+For a CPU-only build with OpenBLAS math library run:
 
 ```bash
     rm -rf build
     mkdir -p build && cd build
-    cmake -GNinja \
+    ~/.local/bin/cmake -GNinja \
 
 Review comment:
   Somehow I found using this absolute path causes inconvenience as my 'cmake' is not installed on this path, nor is the default one on AWS DLAMI. Do you have a better idea to not using a fixed path?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services