Linux CUDA installation [sudo sh error]

#1

When I tried to install CUDA in Ubuntu, running:
sudo sh cuda_9.1.85_387.26_linux.run

I kept getting " cuda_9.1.85_387.26_linux.run: Syntax error: newline unexpected"

I don’t know why. Can anyone know the solution to this?

#2

Alternatively, you can pick an instance with CUDA already installed to save these work.

#3

Solved. Thank you so much!

#4

Please look at the install walkthrough.