Skip to content
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

[Done] Upgrade CUDA 8.0 in Docker #1699

Merged
merged 6 commits into from
Mar 28, 2017
Merged

Conversation

gangliao
Copy link
Contributor

@gangliao gangliao commented Mar 24, 2017

Fix #1695

@helinwang
Copy link
Contributor

@gangliao 驱动的问题可以先试试nvidia-docker,如果nvidia-docker也不行的话,应该是我们编译/镜像的问题。如果可以,估计是运行方法的问题。

@helinwang
Copy link
Contributor

helinwang commented Mar 25, 2017

我做了如下命令:

sudo rm -rf build third_party
docker build --no-cache -t paddle-cuda-8-new .
docker run -v $PWD:/paddle -e "WITH_GPU=ON" -e "WITH_AVX=ON" paddle-cuda-8-new
docker build -t paddle-cuda-8 -f build/Dockerfile . 
nvidia-docker run -it --entrypoint bash paddle-cuda-8

仍然有

Traceback (most recent call last):
  File "mnist.py", line 1, in <module>
    import paddle.v2 as paddle
  File "/usr/local/lib/python2.7/dist-packages/paddle/v2/__init__.py", line 14, in <module>
    import optimizer
  File "/usr/local/lib/python2.7/dist-packages/paddle/v2/optimizer.py", line 1, in <module>
    import py_paddle.swig_paddle as swig_api
  File "/usr/local/lib/python2.7/dist-packages/py_paddle/__init__.py", line 15, in <module>
    from util import DataProviderWrapperConverter
  File "/usr/local/lib/python2.7/dist-packages/py_paddle/util.py", line 18, in <module>
    import swig_paddle
  File "/usr/local/lib/python2.7/dist-packages/py_paddle/swig_paddle.py", line 28, in <module>
    _swig_paddle = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/py_paddle/swig_paddle.py", line 24, in swig_import_helper
    _mod = imp.load_module('_swig_paddle', fp, pathname, description)
ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory

git HEAD是最新的,在

commit 929090ed2290b25a1d08959e15a3d6e7a05e1862
Merge: 5961b52 df9993f
Author: QI JUN <qijun1994@hotmail.com>
Date:   Fri Mar 24 18:12:30 2017 +0800

    Merge pull request #1702 from gangliao/python_remove
    
    Fix NOT WITH_PYTHON

git diff:

diff --git a/Dockerfile b/Dockerfile
index ccd43be..c4502e8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
 # A image for building paddle binaries
 # Use cuda devel base image for both cpu and gpu environment
-FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
+FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04
 MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
 
 ARG UBUNTU_MIRROR
diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh
old mode 100644
new mode 100755
index a0da561..5be0eb5
--- a/paddle/scripts/docker/build.sh
+++ b/paddle/scripts/docker/build.sh
@@ -4,7 +4,7 @@ set -e
 
 # Set BASE_IMAGE according to env variables
 if [ ${WITH_GPU} == "ON" ]; then
-  BASE_IMAGE="nvidia/cuda:7.5-cudnn5-runtime-ubuntu14.04"
+  BASE_IMAGE="nvidia/cuda:8.0-cudnn5-runtime-ubuntu14.04"
   # additional packages to install when building gpu images
   GPU_DOCKER_PKG="python-pip python-dev"
 else

@gangliao 能否再看一下/按我贴上来的的命令也试一下?

Copy link
Contributor

@helinwang helinwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.应该是没问题了,暂时没有安装了cuda8的机器,在7.5的机器运行会输出:nvidia-docker | 2017/03/27 13:47:47 Error: unsupported CUDA version: driver 7.5 < image 8.0.61 说明已经正确识别了驱动了。

@gangliao gangliao changed the title [Progress] Upgrade CUDA 8.0 in Docker [Done] Upgrade CUDA 8.0 in Docker Mar 27, 2017
@gangliao
Copy link
Contributor Author

gangliao commented Mar 27, 2017

@helinwang @typhoonzero 可以访问试试 nvidia-docker run -it --entrypoint bash paddle-cuda-8-gang

Copy link
Contributor

@helinwang helinwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我这里试了一下,还需要改一下cmake/cudnn.cmake:

diff --git a/cmake/cudnn.cmake b/cmake/cudnn.cmake
index e5b59be..c31f6c5 100644
--- a/cmake/cudnn.cmake
+++ b/cmake/cudnn.cmake
@@ -11,6 +11,7 @@ list(APPEND CUDNN_CHECK_LIBRARY_DIRS
     ${CUDNN_ROOT}
     ${CUDNN_ROOT}/lib64
     ${CUDNN_ROOT}/lib
+    ${CUDNN_ROOT}/lib/x86_64-linux-gnu
     $ENV{CUDNN_ROOT}
     $ENV{CUDNN_ROOT}/lib64
     $ENV{CUDNN_ROOT}/lib

Copy link
Contributor

@helinwang helinwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants