These steps will walk through creating a docker image for PriusCup.
cd priuscup/docker/simulation-base
./build.bash
cd priuscup/docker/cloudsim-sim-base
./build.bash
cd priuscup/docker/precious
./build.bash
- This script will output a public ssh key. Add this key to your bitbucket account.
- Tag the output image to
precious:latest
sudo docker tag precious:2017_Jan_12_1914 precious:latest
- To enable uploading prius data to s3 bucket, create an
aws_s3_keys.bash
file inpriuscup/aws
and exportAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
variables.
- Start the docker image
cd priuscup/aws
echo "CLOUDSIM_ADMIN=\"abc\"" > $dir/cloudsim-env.bash
echo "{}" > cloudsim-options.bash
./cloudsim_deploy.bash --no-shutdown
- Open a browser to
http://127.0.0.1/
cd priuscup/aws
./run-local.bash
After a few seconds a firefox window will open to 127.0.0.1
- Start a g2.2xlarge instance with the AMI ubuntu-nvidia-docker-16GiB ami-b71142d7
- Use the following script to copy the image to the instance
cd priuscup/aws
./deploy-ec2.bash
- SSH into the instance and create the file
/home/ubuntu/code/aws_s3_keys.bash
modifying the contents below appropriately
export AWS_ACCESS_KEY_ID=idOfBucketWriterUser
export AWS_SECRET_ACCESS_KEY=secretKeyOfBucketWriterUser
- Save the AMI
- Build a docker image (see instructions above)
- Save the image to a tar archive
sudo docker save --output=/tmp/precious.tar precious:latest
- Copy the tar archive to the demo machine and load it into docker
sudo docker load --input=/tmp/precious.tar
- Copy the
aws
folder to the demo machine - To start a demo on the local machine, call
./run-local.bash