Setup problems: AWS


(Girija) #338

Hi, Even I am getting the same error. Could you help me?

$ bash setup_p2.sh
setup_p2.sh: line 7: syntax error near unexpected token newline' setup_p2.sh: line 7:


(Jude Ben) #339

Open setup_p2.sh from your local machine, and also open setup_p2.sh in the github repo. Manaully copy the github version to your local version. It seems the was a download error on the file, that included HTML in the file too.


(orl) #340

do you have a link to the installation?


#341

Hi, after using command WGET, I coppied all the original code lines from github file and replaced all the old code lines in file C:\cygwin64\home\USER\setup_p2.sh
then “bash setup_p2.sh”. And it works correctly.

hope this cheat may help you


#342

Hey Jeremy & Nichol, I was facing the same issue with Cygwin. It was not able to find the Python directory.
So, I got the Ubuntu bash shell on Windows 10, it’s seamless. Just follow the instructions from https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/ .
After that is done you can get back to Jeremy’s manual of installing Python and Aws.
Simply ‘sudo apt-get install python-pip python-dev build-essential’ then 'pip install awscli’
Thanks Jeremy, this worked very well. Thanks Suvro


#343

Hey Jeremy & Nichol, I was facing the same issue with Cygwin. It was not able to find the Python directory.
So, I got the Ubuntu bash shell on Windows 10, it’s seamless. Just follow the instructions from https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/ .
After that is done you can get back to Jeremy’s manual of installing Python and Aws.
Simply ‘sudo apt-get install python-pip python-dev build-essential’ then 'pip install awscli’
Thanks Jeremy, this worked very well. Thanks


(gaurav gupta) #344

I get his error on nvidia-smi. I had setup p2 instance using the latest script.
ubuntu@ip-10-0-0-4:~$ nvidia-smi
modprobe: ERROR: …/libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='nvidia_367’
modprobe: ERROR: could not insert ‘nvidia_367’: Unknown symbol in module, or unknown parameter (see dmesg)
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.


(gaurav gupta) #345

did this to resolve the problem.
sudo dpkg --configure -a


#346

I have run the script https://github.com/fastai/courses/blob/master/setup/setup_p2.sh for making p2 instance, the script has run successfully and the instance has been made. Problem arise when I try to run nvidia-smi it says command not found, I have already tried to run sudo modprobe nvidia same problem arise, and I have updated the instance with sudo apt-get update && sudo apt-get upgrade, but the problem still remain. Any help? Thanks!

Edit

Fixed


#347

HI guys, i got a problem with my cuda driver. I have made all my configurations settled a month ago and run theano successfully. However, today when i run my code on python it raise an exception as follows:

import theano
Using gpu device 0: GeForce GTX 950 (CNMeM is disabled, cuDNN not available)

Exception Traceback (most recent call last)
in ()
----> 1 import theano

e:\Users\win10\Anaconda2\lib\site-packages\theano_init_.pyc in ()
109
110 if config.enable_initial_driver_test:
–> 111 theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
112
113 if (config.device.startswith(‘cuda’) or

e:\Users\win10\Anaconda2\lib\site-packages\theano\sandbox\cuda\tests\test_driver.pyc in test_nvidia_driver1()
35 raise AssertionError(msg)
36 if not numpy.allclose(f(), a.sum()):
—> 37 raise Exception("The nvidia driver version installed with this OS "
38 "does not give good results for reduction."
39 "Installing the nvidia driver available on the same "

Exception: The nvidia driver version installed with this OS does not give good results for reduction.Installing the nvidia driver available on the same download page as the cuda package will fix the problem: http://developer.nvidia.com/cuda-downloads
I’v tried a lot of Nvidia drivers but it didn’t work. What 's wrong with my OS:cry:


(Girija) #349

Hi, Very happy to start the course. But I am stuck with the following error in the setup. I am using Windows 8.1 Please help.

$ bash setup_p2.sh
Setup_p2.sh: line 7: syntax error near unexpected token ‘newline’
Setup_p2.sh: line 7: ‘’

Warm Regards,
Girija


(Girija) #350

Hi, Tried as suggested. But no luck. Other solution pl


(Zarak) #351

Hi Girija,

The setup_p2.sh script is quite short. Maybe you can set the bash environment variables manually before running setup_instance.sh? You don’t need to set the region variable; just ami and instanceType.

Here it is for reference:

#!/bin/bash
#
# Configure a p2.xlarge instance

# get the correct ami
export region=`aws configure get region`
if [ $region = "us-west-2" ]; then
   export ami="ami-bc508adc" # Oregon
elif [ $region = "eu-west-1" ]; then
   export ami="ami-b43d1ec7" # Ireland
elif [ $region = "us-east-1" ]; then
  export ami="ami-31ecfb26" # Virginia
else
  echo "Only us-west-2 (Oregon), eu-west-1 (Ireland), and us-east-1 (Virginia) are currently supported"
  exit 1
fi

export instanceType="p2.xlarge"

. $(dirname "$0")/setup_instance.sh

(Girija) #352

Many thanks. Still I am getting the same error. Tried with the original 132 line script also. same error.

Could you please help me manual setting up the bash environmental variables?


(Zarak) #353

What do you get when you type this in bash:

aws configure get region

Maybe your aws output is not configured to text. Try typing this in bash and let me know what you see:

cat ~/.aws/config


(Girija) #354

tks again. Yeah region I have changed to “eu-west-1”

aws configure get region
eu-west-1

cat ~/.aws/config
[defaut]
output = text
region = eu-west-1

I changed the region because of the following. Would like to test…

rachelRachel ThomasJan 10
@Cherie I have updated the setup scripts so that one script works for all regions now: https://github.com/fastai/courses/blob/master/setup/setup_p2.sh16


(Girija) #355

changed the region to “us-west-2” then also same error as follows.

KIRTAN 1@KIRTAN ~
$ aws configure get region
us-west-2

KIRTAN 1@KIRTAN ~
$ cat ~/.aws/config
[default]
output = text
region = us-west-2

KIRTAN 1@KIRTAN ~
$ bash setup_p2.sh
setup_p2.sh: line 7: syntax error near unexpected token newline' setup_p2.sh: line 7:


(Girija) #356

Hi, I am also getting the same issue. how did you resolve this? could you help me?

$ cat ~/.aws/config
[default]
output = text
region = us-west-2

$ bash setup_p2.sh
setup_p2.sh: line 7: syntax error near unexpected token newline' setup_p2.sh: line 7:


(Zarak) #357

Assuming you’re in the setup directory, type the following in bash

export ami="ami-bc508adc"
export instanceType="p2.xlarge"
bash setup_instance.sh

(Girija) #358

Many thanks for your help. Sorry to bother you.

could you please pinpoint what exactly means the ‘setup’ directory?

tried as suggested…
$ export ami = “ami-bc508adc”
-bash: export: =': not a valid identifier -bash: export:ami-bc508adc’: not a valid identifier