提交 a3a7e76c 编写于 作者: Y Yi Wang

Respond to Helin's comments

上级 74bcf34f
...@@ -20,22 +20,28 @@ For each version of PaddlePaddle, we release 4 variants of Docker images: ...@@ -20,22 +20,28 @@ For each version of PaddlePaddle, we release 4 variants of Docker images:
| gpu-noavx | no | yes | | gpu-noavx | no | yes |
+-----------------+-------------+-------+ +-----------------+-------------+-------+
The following command line detects if your CPU supports :code:`AVX`. We run the following command on Linux to check if the CPU supports :code:`AVX`.
.. code-block:: bash .. code-block:: bash
if cat /proc/cpuinfo | grep -i avx; then echo Yes; else echo No; fi
On Mac OS X, we need to run
.. code-block:: bash
if cat /proc/cpuinfo | grep -q avx ; then echo "Support AVX"; else echo "Not support AVX"; fi sysctl -a | grep machdep.cpu.leaf7_features
Once we determine the proper variant, we can cope with the Docker image tag name by appending the version number. For example, the following command runs the AVX-enabled image of the most recent version: Once we determine the proper variant, we can cope with the Docker image tag name by appending the version number. For example, the following command runs the AVX-enabled image of the most recent version:
.. code-block:: bash .. code-block:: bash
docker run -it --rm paddledev/paddle:cpu-latest /bin/bash docker run -it --rm paddledev/paddle:cpu-latest /bin/bash
To run a GPU-enabled image, you need to install CUDA and let Docker knows about it: To run a GPU-enabled image, you need to install CUDA and let Docker knows about it:
.. code-block:: bash .. code-block:: bash
export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')" export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')"
export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}') export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
...@@ -43,13 +49,13 @@ To run a GPU-enabled image, you need to install CUDA and let Docker knows about ...@@ -43,13 +49,13 @@ To run a GPU-enabled image, you need to install CUDA and let Docker knows about
The default entry point of all our Docker images starts the OpenSSH server. To run PaddlePaddle and to expose OpenSSH port to 2202 on the host computer: The default entry point of all our Docker images starts the OpenSSH server. To run PaddlePaddle and to expose OpenSSH port to 2202 on the host computer:
.. code-block:: bash .. code-block:: bash
docker run -d -p 2202:22 paddledev/paddle:cpu-latest docker run -d -p 2202:22 paddledev/paddle:cpu-latest
Then we can login to the container using username :code:`root` and password :code:`root`: Then we can login to the container using username :code:`root` and password :code:`root`:
.. code-block:: bash .. code-block:: bash
ssh -p 2202 root@localhost ssh -p 2202 root@localhost
......
...@@ -4,7 +4,8 @@ MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> ...@@ -4,7 +4,8 @@ MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
# It is good to run apt-get install with Dockerfile RUN directive, # It is good to run apt-get install with Dockerfile RUN directive,
# because if the following invocation to /root/build.sh fails, `docker # because if the following invocation to /root/build.sh fails, `docker
# build` wouldn't have to re-install packages after we fix # build` wouldn't have to re-install packages after we fix
# /root/build.sh. # /root/build.sh. For more about Docker build cache, please refer to
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache.
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y cmake libprotobuf-dev protobuf-compiler git \ apt-get install -y cmake libprotobuf-dev protobuf-compiler git \
libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip \ libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册