Skip to content

API for the scigym library to curate scientific reinforcement learning environments.

Notifications You must be signed in to change notification settings

HendrikPN/scigym-api

Repository files navigation

scigym-api

Build Status Built with

Upload your open ai gym environments for people to test/tinker/upload. Check out the project's documentation.

Prerequisites

Local Development

Copy .env.template to .env and make sure all the keys are filled out.

Start the dev server for local development:

docker-compose up

Run a command inside the docker container:

docker-compose run --rm web [command]

Open a shell inside the docker container:

docker-compose exec web bash

Continuous Deployment

Deployment is automated via Travis. When builds pass on the master or qa branch, Travis will deploy that branch to Heroku. Follow these steps to enable this feature.

Initialize the production server:

heroku create scigym-prod --remote prod && \
    heroku addons:create newrelic:wayne --app scigym-prod && \
    heroku addons:create heroku-postgresql:hobby-dev --app scigym-prod && \
    heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 32` \
        DJANGO_AWS_ACCESS_KEY_ID="Add your id" \
        DJANGO_AWS_SECRET_ACCESS_KEY="Add your key" \
        DJANGO_AWS_STORAGE_BUCKET_NAME="scigym-prod" \
        DJANGO_CONFIGURATION="Production" \
        DJANGO_SETTINGS_MODULE="scigym.config" \
        --app scigym-prod

Initialize the qa server:

heroku create scigym-qa --remote qa && \
    heroku addons:create newrelic:wayne --app scigym-qa && \
    heroku addons:create heroku-postgresql:hobby-dev --app scigym-qa && \
    heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 32` \
        DJANGO_AWS_ACCESS_KEY_ID="Add your id" \
        DJANGO_AWS_SECRET_ACCESS_KEY="Add your key" \
        DJANGO_AWS_STORAGE_BUCKET_NAME="scigym-qa" \
        DJANGO_CONFIGURATION="Production" \
        DJANGO_SETTINGS_MODULE="scigym.config" \
        --app scigym-qa

Securely add your Heroku credentials to Travis so that it can automatically deploy your changes:

travis encrypt HEROKU_AUTH_TOKEN="$(heroku auth:token)" --add

Commit your changes and push to master and qa to trigger your first deploys:

git commit -a -m "ci(travis): add Heroku credentials" && \
git push origin master:qa && \
git push origin master

You're now ready to continuously ship! ✨ 💅 🛳

About

API for the scigym library to curate scientific reinforcement learning environments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published