Bran is used as a cli to automatically create and ssh into an ec2 instance given user input settings. Bran automatically sets up the docker container needed to run raven.
The AWSCLI must be installed and configured with aws configure
before running Bran.
Developed on Python 3.6.8
- Clone repository onto local machine:
git clone https://github.com/autognc/bran.git
- Navigate to the downloaded repository:
cd bran
- Create conda environment:
conda env create -f environment.yml
- Activate conda environment:
conda activate bran
- Install with pip:
pip install -e .
- Go to the EC2 Dashboard in the AWS Console
- Click Security Groups under Network & Security located in the left column
- Make sure you are in the same region on the top right as your local aws configuration
- Click Create Security Group
- Enter a Security Group Name and Description
- With the Inbound field highlighted, click Add Rule
- Select Custom TCP for Type
- Enter 22 for Port Range
- Choose Anywhere for Source
- Enter a Description for the security group
- Click Create
- Make sure that the credentials are stored at
~/.aws/credentials
- Command to run:
bran
- Choose between Blender image generation and ravenML training
- For ravenML:
- Choose plugin to install and ravenML-train-plugins branch to install from
- Specify path to ravenML config file
- For Blender:
- Specify path to .blend file
- Specify path to image generation script
- Specify path to requirements.txt(listing of python modules needed to run image generation script)
- For ravenML:
- Select options for ec2 instance parameters. Use g3.4xlarge for GPU trainings and t2.medium for CPU trainings. Make sure to select the custom security group created earlier. Use around 120 gbs for storage or 160 gbs if using an especially large dataset.
- Wait until initialized
- Enter
yes
if prompted about adding ssh key to your repo and click enter - You should be ssh'd into the instance automatically with ravenML installed with the plugin selected
- Start tmux by typing
tmux
into the shell - Type the ravenML training or Blender image generation command you want inside the started tmux session
- Leave/detach the tmux session by typing
Ctrl+b
and thend