Skip to content

Instantly share code, notes, and snippets.

@vaibhaw
Last active February 8, 2017 18:40
Show Gist options
  • Save vaibhaw/9dbdce28877288e0a411850a6f1d12f0 to your computer and use it in GitHub Desktop.
Save vaibhaw/9dbdce28877288e0a411850a6f1d12f0 to your computer and use it in GitHub Desktop.
AWS Instance setup for py-faster-rcnn

AWS Instance Setup

OS

Ubuntu 14.04 Server HMV

Instance

gpu2.2xlarge or gpu2.8xlarge

Storage

  • root /dev/sda1 20 GB SSD gp2
  • EBS /dev/sdf 100 GB SSD gp2

We can add EBS storage later too. It's size is dependent on the size of data that we want to process.

Server IP

Assign an Elastic IP and associate it with the instance. This is useful if you don't want to run the instance all the time. AWS provides 5 free Elastic IPs to all users only if they are attached to an instance. Any unassociated IP is chargeable.

Security Group

Inbound:

  • http everywhere
  • https everywhere
  • ssh everywhere

Outboud:

  • All Traffic everywhere

Launch the instance and log in with the key.

Attach EBS Storage

# List available disk devices
lsblk

# Check filesystem type
sudo file -s /dev/xvdf

# If it says "data", we have to format this disk.
# We will format the disk in ext4 format.
sudo mkfs -t ext4 /dev/xvdf

# create mount directory
sudo mkdir /bigdata

# mount EBS disk
sudo mount -t auto /dev/xvdf /bigdata

# change directory owner from root to user
# e.g. sudo chown user:group /bigdata
sudo chown ubuntu:ubuntu /bigdata

# Now create a script in home directory to mount this volume whenever you run that script.
touch mount_bigdata.sh
echo "sudo mount -t auto /dev/xvdf /bigdata" >> mount_bigdata.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment