[DOC] Update ubuntu install instructions from source#14534
[DOC] Update ubuntu install instructions from source#14534aaronmarkham merged 4 commits intoapache:masterfrom
Conversation
|
@mxnet-label-bot add [Doc, Installation, pr-awaiting-review] |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
| .. | ||
| ninja |
There was a problem hiding this comment.
-DUSE_MKLDNN will be turned on by default in this cmake line? Seems we need change the description in the next section and document the default behavior somewhere.
There was a problem hiding this comment.
MKL install requires additional steps in Ubuntu that are not part of the installation, so it's disabled. by -DUSE_MKL_IF_AVAILABLE=OFF even if any other MKL variables are on.
There was a problem hiding this comment.
All MKL is disabled, check the end of the line: https://github.com/apache/incubator-mxnet/blob/master/CMakeLists.txt#L31
docs/install/ubuntu_setup.md
Outdated
| ```bash | ||
| export LD_LIBRARY_PATH=$PWD/lib | ||
| export LD_LIBRARY_PATH=`realpath build` | ||
| export MXNET_LIBRARY_PATH=`realpath build/libmxnet.so` |
There was a problem hiding this comment.
When will this env variable be used?
There was a problem hiding this comment.
MXNET_LIBRARY_PATH when loading the library from python.
There was a problem hiding this comment.
But why do we need this? It seems to work fine without having to set this env variable earlier.
There was a problem hiding this comment.
It was there in the instructions already. I agree is not necessary.
There was a problem hiding this comment.
It was there in the instructions already. I agree is not necessary.
I could not find it in the instructions before this PR. If not necessary, can we not add it to the doc?
There was a problem hiding this comment.
Sure. I'm indifferent. While it can help debugging we can remove to keep the instructions lean. As you can see in the patch it was there already.
aaronmarkham
left a comment
There was a problem hiding this comment.
Some minor suggestions.
| sudo apt-get install -y build-essential git ninja-build ccache | ||
| ``` | ||
|
|
||
| **For Ubuntu 18.04 and CUDA builds you need to update CMake** |
There was a problem hiding this comment.
What is the implication for older Ubuntu OS? Is there a version >= that must be met?
There was a problem hiding this comment.
For older versions the distribution's provided CMake is working.
There was a problem hiding this comment.
Should we clarify that in the doc?
There was a problem hiding this comment.
No, I guess it is fine if there is no action required.
| sudo apt remove --purge --auto-remove cmake | ||
|
|
||
| # Update CMAKE for correct cuda autotedetection: https://github.com/clab/dynet/issues/1457 | ||
| version=3.14 |
There was a problem hiding this comment.
Putting in version number in the docs makes them go stale pretty fast. Is there a way to consolidate versions in a file so it can be managed there instead of sprinkled throughout code blocks in the docs?
There was a problem hiding this comment.
I think this is fine. This is the minimum version that works with ubuntu 18.04 I think is ok to put it there, and people can update it. If you put an indirect reference becomes more messy to maintain.
| echo "USE_BLAS = openblas" >> ./config.mk | ||
| make -j $(nproc) | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Should put something here instead of having two code blocks back to back... some description...
|
@larroy Is this PR good to merge now ? |
| cmake -GNinja \ | ||
| -DUSE_CUDA=OFF \ | ||
| -DUSE_MKL_IF_AVAILABLE=OFF \ | ||
| -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ |
There was a problem hiding this comment.
I am not an expert in cmake but is ccache a de facto build option for cmake build system? Can we leave this option to user?
There was a problem hiding this comment.
needs to be enabled explicitly with this flag, is not default. I think we should enable it in our instructions to speed up development process. Otherwise it becomes an obscure trick.
|
@piyushghai up to reviewers to approve or follow up on the changes / made additional requests. @apeforest @aaronmarkham |
aaronmarkham
left a comment
There was a problem hiding this comment.
I'm ok with the current changes here.
apeforest
left a comment
There was a problem hiding this comment.
Looks fine to me. Just one small comment added. Thanks!
Co-Authored-By: larroy <pedro.larroy.lists@gmail.com>
|
Restarted CI (Julia test failed for some reason... let's see if gets though this time...) |
|
@aaronmarkham @apeforest are we good to merge? |
* Update ubuntu install instructions from source * Update docs/install/ubuntu_setup.md Co-Authored-By: larroy <pedro.larroy.lists@gmail.com> * Address CR comments * Address CR comments
Description
This PR updates ubuntu install instructions by using CMake and adding steps needed to update CMake on ubuntu 18.04 otherwise developers get nontrivial error messages.
@aaronmarkham
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.