See the mission description at HACKtheMACHINE: Unmanned Track 3.
It's recommended to use VSCode. A dev environment is already configured to run in VSCode terminal.
Add a .env file to the project with your AWS credentials:
AWS_ACCESS_KEY_ID=…
AWS_SECRET_ACCESS_KEY=…
CDK_DEFAULT_ENV_NAME=user-…If you prefer another editor then checkout .devcontainer/Dockerfile for instructions on setting up a dev environment.
Install Node.js dependencies:
yarn installInstall Python dependencies:
poetry install
poetry run python model/ray/patch.pyRun the following command with your {ACCOUNT_ID}:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 763104351884.dkr.ecr.us-east-1.amazonaws.com
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin {ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com
The cdk.json file tells the CDK Toolkit how to execute your app.
If this is the first time a CDK project has been deployed to this particular account, run:
yarn cdk bootstrap
At this point you can now synthesize the CloudFormation template for this code.
yarn cdk synth
To add additional dependencies, for example other CDK libraries, just add
them to your package.json file and rerun the yarn install command.
-
yarn cdk lslist all stacks in the app -
yarn cdk synthemits the synthesized CloudFormation template -
yarn cdk deploy --outputs-file cdk.outputs.jsondeploy this stack to your default AWS account/region -
yarn cdk diffcompare deployed stack with current state -
yarn cdk docsopen CDK documentation -
yarn cdk destroydestroy stack -
yarn sagemaker:algorithm:createcreate Sagemaker training algorithm -
yarn sagemaker:algorithm:ydescribedescribe Sagemaker training algorithm -
yarn sagemaker:algorithm:updateupdate Sagemaker training algorithm -
yarn cdk deploy --outputs-file cdk.outputs.json && yarn sagemaker:algorithm:updatedeploy and update
Add a .wandb_api_key to the root of the project.
Register for an API key at Weights & Biases.
Commands are stored in the scripts section of ./package.json:
poetry run python model/server/Forge.py generateGenerate model environmentspoetry run python model/server/Forge.py train --RENDER=TrueTrain model./model/client/run.shVisualize model training
Training for the original Neural MMO competition config:
poetry run python model/server/Forge.py generate --config=CompetitionRound1 --TERRAIN_RENDER=True
poetry run python model/server/Forge.py train --config=CompetitionRound1 --RENDER=TrueTraining for HACKtheMACHINE:
poetry run python model/server/Forge.py train --config=EastPacificOcean --RENDER=TrueRunning the UI client:
./model/client/run.shThe website’s source code and README is located in the ./site directory.
It's build is output to the ./docs directory and hosted using GitHub Pages.