andreasjansson / simple-aws-gpu-setup

Probably the simplest way to get a GPU instance on AWS up and running and ready with Theano
46 stars 7 forks source link

Issue with Python 2.7 with EU-West-1 #5

Open springcoil opened 9 years ago

springcoil commented 9 years ago

Hi I am trying to recreate this with Python 2.7. On a Mac OS X

I tried changing the EC2.py file to change this to EU-West-1a

(py27)Peadars-MBP% fab pricing ec2 Traceback (most recent call last): File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/main.py", line 743, in main _args, _kwargs File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/tasks.py", line 427, in execute results[''] = task.run(_args, _new_kwargs) File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run return self.wrapped(_args, _kwargs) File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/decorators.py", line 139, in decorated decorated.return_value = func(_args, _kwargs) File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/headintheclouds/tasks.py", line 118, in pricing provider.pricing(sort) File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/headintheclouds/ec2.py", line 77, in pricing availability_zone='eu-west-1a', File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/boto/ec2/connection.py", line 1013, in get_spot_price_history [('item', SpotPriceHistory)], verb='POST') File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/boto/connection.py", line 1057, in get_list raise self.ResponseError(response.status, response.reason, body) boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request <?xml version="1.0" encoding="UTF-8"?>

InvalidParameterValueInvalid availability zone: [eu-west-1a]e55c807d-96c2-4f7b-83f1-b9ff7dd65b83
andreasjansson commented 9 years ago

Headintheclouds is a little janky to run in different zones than us-east, but if your really want to, you can replace the line

_ec2.client = boto.ec2.connection.EC2Connection(ACCESS_KEY_ID, SECRET_ACCESS_KEY)

with

ec2.client = boto.ec2.connect_to_region('eu-west-1', aws_access_key_id=ACCESS_KEY_ID, aws_secret_access_key=SECRET_ACCESS_KEY)

and then you can change the availability_zone to eu-west-1a.