1. 程式人生 > >ubuntu caffe 下安裝nvidia digits排錯

ubuntu caffe 下安裝nvidia digits排錯

輸入:

./digits-devserver後出現下面的提示:


  ___ ___ ___ ___ _____ ___
 |   \_ _/ __|_ _|_   _/ __|
 | |) | | (_ || |  | | \__ \
 |___/___\___|___| |_| |___/ 5.1-dev


A valid Caffe installation was not found on your system.
Use the envvar CAFFE_ROOT to indicate a valid installation.
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/zhengguangyuan/digits/digits/__main__.py", line 70, in <module>
    main()
  File "/home/zhengguangyuan/digits/digits/__main__.py", line 53, in main
    import digits.config
  File "digits/config/__init__.py", line 7, in <module>
    from . import (  # noqa
  File "digits/config/caffe.py", line 230, in <module>
    executable, version, flavor = load_from_path()
  File "digits/config/caffe.py", line 54, in load_from_path
    raise ValueError('Caffe executable not found in PATH')
ValueError: Caffe executable not found in PATH

搜到: https://github.com/NVIDIA/DIGITS/issues/1107

的解決方案:

# Check the current value of your envvar
#檢查當前envvar的值
$ echo$CAFFE_ROOT# Add the envvar to ~/.profile so it will load automatically when you login
#把envvar加到~/.profile中,下次當你登入時會自動載入
$ echo"export CAFFE_ROOT=/home/username(我的賬戶名)/caffe/">>~/.profile

# Load the new configuration
#載入新配置
$ source~/.profile

# Check the new envvar value
#檢查新配置
$ echo$CAFFE_ROOT
/home/username/caffe/
按上面的方法改了之後,digits順利啟動。