@@ -34,14 +34,12 @@ Or you can build your own image from source as the optional step below:
34
34
# 2. Optional: build development docker image from source
35
35
docker build -t paddle:dev .
36
36
# 3. Run the following command to build a CPU-Only binaries
37
- docker run -it -v $PWD :/paddle -e " WITH_GPU=OFF" -e " WITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 bash -x /paddle /paddle/scripts/paddle_build.sh build
37
+ docker run -it -v $PWD :/paddle -w /paddle - e " WITH_GPU=OFF" -e " WITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 . /paddle/scripts/paddle_build.sh build
38
38
# 4. Or, use your built Docker image to build PaddlePaddle (must run step 2)
39
- docker run -it -v $PWD :/paddle -e " WITH_GPU=OFF" -e " WITH_TESTING=OFF" paddle:dev
39
+ docker run -it -v $PWD :/paddle -w /paddle - e " WITH_GPU=OFF" -e " WITH_TESTING=OFF" paddle:dev ./paddle/scripts/paddle_build.sh build
40
40
41
41
NOTE: The above command try to mount the current working directory (root directory of source code)
42
- into :code: `/paddle ` directory inside docker container. If you are using your own image
43
- (Step 4) it will run default entry-point :code: `build.sh ` , so you could omit the last
44
- command in step 3.
42
+ into :code: `/paddle ` directory inside docker container.
45
43
46
44
When the compile finishes, you can get the output whl package under
47
45
build/python/dist, then you can choose to install the whl on local
@@ -74,15 +72,15 @@ Set :code:`WITH_GPU=ON` Can also run tests on GPU.
74
72
75
73
.. code-block :: bash
76
74
77
- docker run -it -v $PWD :/paddle -e " WITH_GPU=OFF" -e " WITH_TESTING=ON" -e " RUN_TEST=ON" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 bash -x paddle /paddle/scripts/docker/build .sh
75
+ docker run -it -v $PWD :/paddle -w /paddle - e " WITH_GPU=OFF" -e " WITH_TESTING=ON" -e " RUN_TEST=ON" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 . /paddle/scripts/paddle_build .sh test
78
76
79
77
If you wish to run only one unit test, like :code: `test_sum_op `:
80
78
81
79
.. code-block :: bash
82
80
83
- docker run -it -v $PWD :/paddle -e " WITH_GPU=OFF" -e " WITH_TESTING=ON" -e " RUN_TEST=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 /bin/bash
84
- bash /paddle/paddle/ scripts/docker/build .sh
85
- cd /paddle/ build
81
+ docker run -it -v $PWD :/paddle -w /paddle - e " WITH_GPU=OFF" -e " WITH_TESTING=ON" -e " RUN_TEST=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 /bin/bash
82
+ . /paddle/scripts/paddle_build .sh build
83
+ cd build
86
84
ctest -R test_sum_op -V
87
85
88
86
.. _faq_docker :
0 commit comments