-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Fix invalid paddle binary file path #3421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
dfc86dd
98255dc
a87b82c
d6bd503
98b35ab
d98e2d5
5c926b0
a872e33
ec9ac91
3565518
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ As a simple example, consider the following: | |
|
|
||
| 1. **BLAS Dependencies(optional)** | ||
|
|
||
| CMake will search BLAS libraries from system. If not found, OpenBLAS will be downloaded, built and installed automatically. | ||
| CMake will search BLAS libraries from the system. If not found, OpenBLAS will be downloaded, built and installed automatically. | ||
| To utilize preinstalled BLAS, you can simply specify MKL, OpenBLAS or ATLAS via `MKL_ROOT`, `OPENBLAS_ROOT` or `ATLAS_ROOT`. | ||
|
|
||
| ```bash | ||
|
|
@@ -131,9 +131,9 @@ As a simple example, consider the following: | |
| To build GPU version, you will need the following installed: | ||
|
|
||
| 1. a CUDA-capable GPU | ||
| 2. A supported version of Linux with a gcc compiler and toolchain | ||
| 2. A supported version of Linux with a GCC compiler and toolchain | ||
| 3. NVIDIA CUDA Toolkit (available at http://developer.nvidia.com/cuda-downloads) | ||
| 4. NVIDIA cuDNN Library (availabel at https://developer.nvidia.com/cudnn) | ||
| 4. NVIDIA cuDNN Library (available at https://developer.nvidia.com/cudnn) | ||
|
|
||
| The CUDA development environment relies on tight integration with the host development environment, | ||
| including the host compiler and C runtime libraries, and is therefore only supported on | ||
|
|
@@ -162,16 +162,27 @@ mkdir build && cd build | |
|
|
||
| Finally, you can build and install PaddlePaddle: | ||
|
|
||
| ```bash | ||
| # you can add build option here, such as: | ||
| cmake .. -DCMAKE_INSTALL_PREFIX=<path to install> | ||
| # please use sudo make install, if you want to install PaddlePaddle into the system | ||
| make -j `nproc` && make install | ||
| # set PaddlePaddle installation path in ~/.bashrc | ||
| export PATH=<path to install>/bin:$PATH | ||
| # install PaddlePaddle Python modules. | ||
| sudo pip install <path to install>/opt/paddle/share/wheels/*.whl | ||
| ``` | ||
| - Install PaddlePaddle with `make install` | ||
| ```bash | ||
| # you can add build option here, such as: | ||
| cmake .. -DCMAKE_INSTALL_PREFIX=<path to install> | ||
| # please use sudo make install, if you want to install PaddlePaddle into the system | ||
| make -j `nproc` && make install | ||
| # set PaddlePaddle installation path in ~/.bashrc | ||
| export PATH=<path to install>/bin:$PATH | ||
| # install PaddlePaddle Python modules. | ||
| sudo pip install <path to install>/opt/paddle/share/wheels/*.whl | ||
| ``` | ||
|
||
|
|
||
| - Install PaddlePaddle with `pip install` | ||
| ```bash | ||
| # buid PaddlePaddle | ||
| cmake .. | ||
| make -j `nproc` | ||
| # install PaddlePaddle modules, you can specify the customer install path with --prefix | ||
| sudo pip install python/dist/*.whl --prefix=<path to install> | ||
| ``` | ||
|
|
||
| ## <span id="centos">Build on Centos 7</span> | ||
|
|
||
| ### Install Dependencies | ||
|
|
@@ -192,9 +203,9 @@ sudo pip install <path to install>/opt/paddle/share/wheels/*.whl | |
| To build GPU version, you will need the following installed: | ||
|
|
||
| 1. a CUDA-capable GPU | ||
| 2. A supported version of Linux with a gcc compiler and toolchain | ||
| 2. A supported version of Linux with a GCC compiler and toolchain | ||
| 3. NVIDIA CUDA Toolkit (available at http://developer.nvidia.com/cuda-downloads) | ||
| 4. NVIDIA cuDNN Library (availabel at https://developer.nvidia.com/cudnn) | ||
| 4. NVIDIA cuDNN Library (available at https://developer.nvidia.com/cudnn) | ||
|
|
||
| The CUDA development environment relies on tight integration with the host development environment, | ||
| including the host compiler and C runtime libraries, and is therefore only supported on | ||
|
|
@@ -223,13 +234,23 @@ mkdir build && cd build | |
|
|
||
| Finally, you can build and install PaddlePaddle: | ||
|
|
||
| ```bash | ||
| # you can add build option here, such as: | ||
| cmake3 .. -DCMAKE_INSTALL_PREFIX=<path to install> | ||
| # please use sudo make install, if you want to install PaddlePaddle into the system | ||
| make -j `nproc` && make install | ||
| # set PaddlePaddle installation path in ~/.bashrc | ||
| export PATH=<path to install>/bin:$PATH | ||
| # install PaddlePaddle Python modules. | ||
| sudo pip install <path to install>/opt/paddle/share/wheels/*.whl | ||
| ``` | ||
| - Install PaddlePaddle with `make install` | ||
| ```bash | ||
| # you can add build option here, such as: | ||
| cmake3 .. -DCMAKE_INSTALL_PREFIX=<path to install> | ||
| # please use sudo make install, if you want to install PaddlePaddle into the system | ||
| make -j `nproc` && make install | ||
| # set PaddlePaddle installation path in ~/.bashrc | ||
| export PATH=<path to install>/bin:$PATH | ||
| # install PaddlePaddle Python modules. | ||
| sudo pip install <path to install>/opt/paddle/share/wheels/*.whl | ||
| ``` | ||
|
||
|
|
||
| - Install PaddlePaddle with `pip install` | ||
| ```bash | ||
| # buid PaddlePaddle | ||
| cmake3 .. | ||
| make -j `nproc` | ||
| # install PaddlePaddle modules, you can specify the customer install path with --prefix | ||
| sudo pip install python/dist/*.whl --prefix=<path to install> | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,13 +24,14 @@ if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']: | |
| setup_requires+=["opencv-python"] | ||
|
|
||
| # the prefix is sys.prefix which should always be usr | ||
| paddle_bin_dir = 'local/opt/paddle/bin' | ||
| paddle_bin_dir = 'opt/paddle/bin' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should cause difference path when use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @tensor-tang , but maybe it doesn't matter for the different path? BTW, the directory in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tensor-tang ,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I am not sure about this, maybe @luotao1 @typhoonzero can answer this?
Totally agreed~ Anyway, I am OK with the both ways, just giving a method for this case.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done with the document for installing PaddlePaddle. |
||
| paddle_bins = ['${PADDLE_BINARY_DIR}/paddle/scripts/paddle_usage', | ||
| '${PADDLE_BINARY_DIR}/paddle/trainer/paddle_trainer', | ||
| '${PADDLE_BINARY_DIR}/paddle/trainer/paddle_merge_model', | ||
| '${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main'] | ||
| '${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main', | ||
| '${PADDLE_BINARY_DIR}/paddle/scripts/paddle'] | ||
|
|
||
| paddle_rt_lib_dir = 'local/lib' | ||
| paddle_rt_lib_dir = 'lib' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this change would impact "pip install " without docker for user. Anyway, if |
||
| paddle_rt_libs = [] if '${MKL_SHARED_LIBS}'== '' else '${MKL_SHARED_LIBS}'.split(';') | ||
|
|
||
| setup(name='paddlepaddle', | ||
|
|
@@ -50,8 +51,7 @@ setup(name='paddlepaddle', | |
| 'paddle.v2.framework.proto': '${PADDLE_BINARY_DIR}/paddle/framework', | ||
| 'py_paddle': '${PADDLE_SOURCE_DIR}/paddle/py_paddle' | ||
| }, | ||
| scripts=['${PADDLE_BINARY_DIR}/paddle/scripts/paddle'], | ||
| scripts=paddle_bins, | ||
| distclass=BinaryDistribution, | ||
| data_files=[(paddle_bin_dir, paddle_bins), | ||
| (paddle_rt_lib_dir, paddle_rt_libs)] | ||
| data_files=[(paddle_rt_lib_dir, paddle_rt_libs)] | ||
| ) | ||
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.
Must inform that choose one of these two methods, not both.
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 think we can use
pip installinstead ofmake install, so I deleted themake install