-
-
Save dmd/ad576724297b1d23d7b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# to use this you need: | |
# jq https://stedolan.github.io/jq/ | |
# awscli https://aws.amazon.com/cli/ | |
AMI=ami-21146944 | |
MACHINE=g2.2xlarge | |
KEYPAIR=amazon-gpu | |
echo starting neural-style instance | |
INSTANCEID=$(aws ec2 run-instances --image-id $AMI --instance-type $MACHINE --key-name $KEYPAIR | jq '.Instances|.[0].InstanceId' | sed 's/"//g') | |
echo $INSTANCEID | |
sleep 5 | |
IPADDR=$(aws ec2 describe-instances --instance-ids $INSTANCEID | jq '.Reservations|.[]|.Instances|.[]|.PublicDnsName'| sed 's/"//g') | |
echo $IPADDR | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this will start an EC2 machine with https://github.com/jcjohnson/neural-style already installed, and return the IP address.