Hello,
I’ve been trying to set this up but I’ve been stuck at the setup_p2 part for almost three hours now - I’ve tried what feels like everything and I’m posting here pretty much out of desperation. I’m on windows 10 & Cygwin.
I got both of these files from the github by running
wget https://raw.githubusercontent.com/fastai/courses/master/setup/setup_p2.sh
wget https://raw.githubusercontent.com/fastai/courses/master/setup/setup_instance.sh
my config file is as follows
[default]
output = text
region = us-west-2
I was able to run aws configure
without incident
however trying to run these returns errors
a suggestion in this thread was to do
export ami="ami-bc508adc"
export instanceType="p2.xlarge"
bash setup_instance.sh
but doing this results in a bunch of malformed errors, which if I uncomment set -x look like this
$ bash setup_instance.sh
+ '[' -z ami-bc508adc ']'
+ '[' -z p2.xlarge ']'
+ export name=fast-ai
+ name=fast-ai
+ export cidr=0.0.0.0/0
+ cidr=0.0.0.0/0
+ hash aws
+ '[' 0 -ne 0 ']'
++ aws configure get aws_access_key_id
+ '[' -z $'*****************S3Q\r' ']'
++ aws ec2 create-vpc --cidr-block 10.0.0.0/28 --query Vpc.VpcId --output text
+ export $'vpcId=vpc-fdbdae9a\r'
+ vpcId=$'vpc-fdbdae9a\r'
+ aws ec2 create-tags --resources $'vpc-fdbdae9a\r' --tags --tags Key=Name,Value > =fast-ai
An error occurred (InvalidID) when calling the CreateTags operation: The ID 'vpc > ' is not valid
+ aws ec2 modify-vpc-attribute --vpc-id $'vpc-fdbdae9a\r' --enable-dns-support ' > {"Value":true}'
+ aws ec2 modify-vpc-attribute --vpc-id $'vpc-fdbdae9a\r' --enable-dns-hostnames > '{"Value":true}'
++ aws ec2 create-internet-gateway --query InternetGateway.InternetGatewayId --o > `utput text`
+ export $'internetGatewayId=igw-7c63a91b\r'
+ internetGatewayId=$'igw-7c63a91b\r'
+ aws ec2 create-tags --resources $'igw-7c63a91b\r' --tags --tags Key=Name,Value > =fast-ai-gateway
An error occurred (InvalidID) when calling the CreateTags operation: The ID 'igw > ' is not valid
+ aws ec2 attach-internet-gateway --internet-gateway-id $'igw-7c63a91b\r' --vpc- > id $'vpc-fdbdae9a\r'
++ aws ec2 create-subnet --vpc-id $'vpc-fdbdae9a\r' --cidr-block 10.0.0.0/28 --q uery Subnet.SubnetId --output text
+ export $'subnetId=subnet-44e2cd23\r'
+ subnetId=$'subnet-44e2cd23\r'
+ aws ec2 create-tags --resources $'subnet-44e2cd23\r' --tags --tags Key=Name,Value=fast-ai-subnet
' is not validred (InvalidID) when calling the CreateTags operation: The ID 'subnet-44e2cd23
++ aws ec2 create-route-table --vpc-id $'vpc-fdbdae9a\r' --query RouteTable.RouteTableId --output text
+ export $'routeTableId=rtb-9cf165fa\r'
+ routeTableId=$'rtb-9cf165fa\r'
+ aws ec2 create-tags --resources $'rtb-9cf165fa\r' --tags --tags Key=Name,Value=fast-ai-route-table
' is not validred (InvalidID) when calling the CreateTags operation: The ID 'rtb-9cf165fa
++ aws ec2 associate-route-table --route-table-id $'rtb-9cf165fa\r' --subnet-id $'subnet-44e2cd23\r' --output text
+ export $'routeTableAssoc=rtbassoc-2457c75d\r'
+ routeTableAssoc=$'rtbassoc-2457c75d\r'
+ aws ec2 create-route --route-table-id $'rtb-9cf165fa\r' --destination-cidr-block 0.0.0.0/0 --gateway-id $'igw-> 7c63a91b\r'
"n error occurred (InvalidRouteTableId.Malformed) when calling the CreateRoute operation: Invalid id: "rtb-9cf165fa
++ aws ec2 create-security-group --group-name fast-ai-security-group --description 'SG for fast.ai machine' --vpc-id $'vpc-fdbdae9a\r' --query GroupId --output text
+ export $'securityGroupId=sg-9a82dce1\r'
+ securityGroupId=$'sg-9a82dce1\r'
+ aws ec2 authorize-security-group-ingress --group-id $'sg-9a82dce1\r' --protocol tcp --port 22 --cidr 0.0.0.0/0
"n error occurred (InvalidGroupId.Malformed) when calling the AuthorizeSecurityGroupIngress operation: Invalid id: "sg-9a82dce1
+ aws ec2 authorize-security-group-ingress --group-id $'sg-9a82dce1\r' --protocol tcp --port 8888-8898 --cidr 0.0.0.0/0
"n error occurred (InvalidGroupId.Malformed) when calling the AuthorizeSecurityGroupIngress operation: Invalid id: "sg-9a82dce1
+ '[' '!' -d /home/Eryk/.ssh ']'
+ '[' '!' -f /home/Eryk/.ssh/aws-key-fast-ai.pem ']'
+ aws ec2 create-key-pair --key-name aws-key-fast-ai --query KeyMaterial --output text
+ chmod 400 /home/Eryk/.ssh/aws-key-fast-ai.pem
++ aws ec2 run-instances --image-id ami-bc508adc --count 1 --instance-type p2.xlarge --key-name aws-key-fast-ai --security-group-ids $'sg-9a82dce1\r' --subnet-id $'subnet-44e2cd23\r' --associate-public-ip-address --block-device-mapping '[ { "DeviceName": "/dev/sda1", "Ebs": { "VolumeSize": 128, "VolumeType": "gp2" } } ]' --query 'Instances[0].InstanceId' --output text
An error occurred (InvalidGroupId.Malformed) when calling the RunInstances operation: Invalid id: "sg-9a82dce1
"
+ export instanceId=
+ instanceId=
+ aws ec2 create-tags --resources --tags --tags Key=Name,Value=fast-ai-gpu-machine
An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet
++ aws ec2 allocate-address --domain vpc --query AllocationId --output text
+ export $'allocAddr=eipalloc-aeade794\r'
+ allocAddr=$'eipalloc-aeade794\r'
+ echo Waiting for instance start...
Waiting for instance start...
+ aws ec2 wait instance-running --instance-ids
I’m pretty confused since I’ve completely started over with these instructions five or six times and I’m pretty sure I’ve been doing everything exactly as the instructions say, but it looks like there’s some sort of syntax issue that’s throwing all of these errors.
I really just want to proceed with the course and I’m starting to run low on ideas on how to tackle this, so I would really appreciate the help