Problems with the install-gpu.sh script

I have a computer running ubuntu 16.04 with a nvidia GTX 1070. I’d like to start using it for this class, so I ran the install-gpu.sh script from the course website. It failed with the following messages:

Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]   
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease    
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]    
Ign:5 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  InRelease
Hit:6 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release
Hit:7 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease  
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB] 
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [2,212 B]
Get:11 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [2,212 B]
Get:12 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [1,144 B]
Fetched 288 kB in 0s (352 kB/s)                                      
Reading package lists... Done
E: Command line option --assume-yes is not understood in combination with the other options
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package binutils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package software-properties-common
install-gpu.sh: line 4: $'\r': command not found
--2016-11-11 10:43:45--  http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb%0D
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 23.6.199.25, 23.6.199.17
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|23.6.199.25|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-11-11 10:43:46 ERROR 404: Not Found.

 (--install):rocessing archive cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
 cannot access archive: No such file or directory
Errors were encountered while processing:
 cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
E: Invalid operation update
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package cuda
 not found in directory /lib/modules/4.4.0-47-generic
install-gpu.sh: line 10: $'nvidia-smi\r': command not found
install-gpu.sh: line 11: $'\r': command not found
--2016-11-11 10:43:46--  https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh%0D
Resolving repo.continuum.io (repo.continuum.io)... 2400:cb00:2048:1::6810:120a, 2400:cb00:2048:1::6810:130a, 104.16.19.10, ...
Connecting to repo.continuum.io (repo.continuum.io)|2400:cb00:2048:1::6810:120a|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-11-11 10:43:46 ERROR 404: Not Found.

bash: Anaconda2-4.2.0-Linux-x86_64.sh: No such file or directory
install-gpu.sh: line 18: conda: command not found
install-gpu.sh: line 19: conda: command not found
install-gpu.sh: line 20: $'\r': command not found
Collecting theano
Collecting numpy>=1.7.1 (from theano)
  Using cached numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl
Collecting scipy>=0.11 (from theano)
  Using cached scipy-0.18.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting six>=1.9.0 (from theano)
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: numpy, scipy, six, theano
Successfully installed numpy-1.11.2 scipy-0.18.1 six-1.10.0 theano-0.8.2
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
install-gpu.sh: line 25: $'\r': command not found
Collecting keras
  Using cached Keras-1.1.1.tar.gz
Collecting theano (from keras)
Collecting pyyaml (from keras)
Collecting six (from keras)
      Using cached six-1.10.0-py2.py3-none-any.whl
Collecting numpy>=1.7.1 (from theano->keras)
      Using cached numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl
Collecting scipy>=0.11 (from theano->keras)
      Using cached scipy-0.18.1-cp27-cp27mu-manylinux1_x86_64.whl
Building wheels for collected packages: keras
      Running setup.py bdist_wheel for keras ... done
      Stored in directory: /home/javed/.cache/pip/wheels/be/d/07/f1f583eb4ee0fba7b79afe86ba7495792ef60a63bfc6870c90
Successfully built keras
Installing collected packages: numpy, scipy, six, theano, pyyaml, keras
Successfully installed keras-1.1.1 numpy-1.11.2 pyyaml-3.12 scipy-0.18.1 six-1.10.0 theano-0.8.2
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
install-gpu.sh: line 34: $'\r': command not found
--2016-11-11 10:43:57--  http://platform.ai/files/cudnn.tgz%0D
Resolving platform.ai (platform.ai)... 67.205.12.187
Connecting to platform.ai (platform.ai)|67.205.12.187|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.platform.ai/files/cudnn.tgz [following]
--2016-11-11 10:43:58--  http://www.platform.ai/files/cudnn.tgz
Resolving www.platform.ai (www.platform.ai)... 67.205.12.187
Reusing existing connection to platform.ai:80.
HTTP request sent, awaiting response... 200 OK
Length: 80352722 (77M) [text/plain]
Saving to: ‘cudnn.tgz%0D’

cudnn.tgz%0D        100%[===================>]  76.63M  6.47MB/s    in 17s     

2016-11-11 10:44:15 (4.38 MB/s) - ‘cudnn.tgz%0D’ saved [80352722/80352722]

tar (child): cudnn.tgz\r: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
: No such file or directory: cuda
cp: cannot stat 'lib64/*': No such file or directory
cp: cannot stat 'include/*': No such file or directory
install-gpu.sh: line 40: $'\r': command not found
install-gpu.sh: line 41: jupyter: command not found
Traceback (most recent call last):
      File "<string>", line 1, in <module>
ImportError: No module named notebook.auth
: No such file or directoryupyter/jupyter_notebook_config.py
: No such file or directoryupyter/jupyter_notebook_config.py
install-gpu.sh: line 47: $'\r': command not found
1 Like

You need to run dos2unix on the script and try running it again.

Thanks! That worked. But now I’m running into another issue… I’ve gone way past the half hour rule trying to fix it. When I run jupyter notebook now, it gives the following errors, and, though jupyter launches, it gives me no way to create a notebook that runs on a Python kernel.

[E 14:38:09.437 NotebookApp] Unhandled error in API request
    Traceback (most recent call last):
      File "/home/javed/anaconda2/lib/python2.7/site-packages/notebook/base/handlers.py", line 457, in wrapper
        result = yield gen.maybe_future(method(self, *args, **kwargs))
      File "/home/javed/anaconda2/lib/python2.7/site-packages/notebook/services/kernelspecs/handlers.py", line 56, in get
        for kernel_name in ksm.find_kernel_specs():
      File "/home/javed/anaconda2/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 192, in find_kernel_specs
        kspecs = super(CondaKernelSpecManager, self).find_kernel_specs()
      File "/home/javed/anaconda2/lib/python2.7/site-packages/jupyter_client/kernelspec.py", line 128, in find_kernel_specs
        for kernel_dir in self.kernel_dirs:
      File "/home/javed/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py", line 554, in __get__
        return self.get(obj, cls)
      File "/home/javed/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py", line 533, in get
        value = self._validate(obj, dynamic_default())
      File "/home/javed/anaconda2/lib/python2.7/site-packages/jupyter_client/kernelspec.py", line 114, in _kernel_dirs_default
        from IPython.paths import get_ipython_dir
      File "/home/javed/anaconda2/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>
        from .core.application import Application
      File "/home/javed/anaconda2/lib/python2.7/site-packages/IPython/core/application.py", line 25, in <module>
        from IPython.core import release, crashhandler
      File "/home/javed/anaconda2/lib/python2.7/site-packages/IPython/core/crashhandler.py", line 28, in <module>
        from IPython.core import ultratb
      File "/home/javed/anaconda2/lib/python2.7/site-packages/IPython/core/ultratb.py", line 131, in <module>
        import IPython.utils.colorable as colorable
    AttributeError: 'module' object has no attribute 'utils'
[E 14:38:09.438 NotebookApp] {
      "Accept-Language": "en-US,en;q=0.5", 
      "Accept-Encoding": "gzip, deflate", 
      "Host": "localhost:8888", 
      "Accept": "*/*", 
      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0", 
      "Connection": "keep-alive", 
      "X-Requested-With": "XMLHttpRequest", 
      "Referer": "http://localhost:8888/tree"
    }
[E 14:38:09.438 NotebookApp] 500 GET /api/kernelspecs (127.0.0.1) 3.03ms referer=http://localhost:8888/tree

I’ve tried uninstalling and reinstalling ipython. Tried doing that with both conda and pip. Doesn’t help. If I remove anaconda2 and install anaconda3 instead, it fixes the problem. Is that an ok solution, or will that break other things that install-gpu.sh script set up?

Thanks!

Anaconda3 should be fine. I try to keep my code compatible with both, but you may have to keep an eye out for little inconsistencies and issues.

@javed.qadruddin looks like you have this problem: https://github.com/ipython/ipykernel/issues/151

Hi Javed,

Can you pls share your setup if you were able to resolve these issues ?
If you can jot down steps to setup that will be useful for GPU with Ubuntu desktop.

@janardhanp22 - I still haven’t gotten it fully working. To get to the point where I’m at now, basically what I did was run the install-gpu.sh script available on the course website. It didn’t work at that point and gave the second error you see on this thread. To fix that error, I had to install anaconda3. I did that by removing anaconda2 (find the anaconda2 directory (probably in your home directory) and do

rm -r anaconda2

From there, you go on the anaconda website and follow the instructions to install anaconda3. Then you can just type jupyter notebook and the notebook app should open in your browser.

I now have further problems though as I cannot get Keras/Theano to work. Going to dive back in this weekend to try to get them working.

Let me know if you have any specific questions and I can try to help.

When you’re back into it let us know what issues you’re having. @vshets has also been through the full installation process so may also be able to assist.

Happy to help … Jeremy and I were working on getting this installed on a aws instance with only Ubuntu installed. Check this thread if there are any parallels: Reduce size of volume

Hi I am having trouble with the install-cpu.sh script. Specifically I get the following error:

The following packages have unmet dependencies:
cuda : Depends: cuda-8-0 (>= 8.0.61) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I am using an AWS Ubuntu instance

Has anyone else had this issue? Any ideas on solutions?

Hi! Not sure if @vshets had this issue or anyone else, but the script runs fine on ubuntu 16.04 but when I reboot I get stuck in a cycle of logins.
I’ve tried all of these ways of getting out of the loop http://www.linuxslaves.com/2016/05/3-ways-fix-ubuntu-gets-stuck-login-loop.html
but thought someone else may have some insight. Thanks

Actually I got it but if anyone runs into this I may be able to help.

Hi @carloxbailey , I am also getting the same error on my Ubuntu 14.04 Nvidia GTX 1050 machine. Please let me know If you have fixed this error.

Hi @jeremy Could you please help me in this issue?

Fixed. I just upgraded my Ubuntu version to 16.04

I had the same error on gtx1070 with driver nvidia-375 and linux mint.
I’v fixed it by installing driver nvidia-384 for videocard and restarting system.