Open Michael-Equi opened 5 years ago
Sagemaker I'd suggest you make a python virtual enviornment for this as it will install a fair bit, and with older versions of packages.
To create a virtual environment you can run python3 -m venv sagemaker_venv to create the virtual environment in the directory sagemaker_venv. To activate the venv, run source sagemaker_venv/bin/activate on linux.
To install sagemaker run pip install -U sagemaker-python-sdk/ awscli pandas.
Now you need to get the docker images that sagemaker is expecting. Run docker pull crr0004/sagemaker-rl-tensorflow:console. I have fixed the python script so it uses this image directly now, no more tagging needed.
You will need to copy the config.yaml file to ~/.sagemaker to configure where the temp directories for the sagemaker docker containers are put. I suggest you edit it to where you want. It is relative to where you run rl_deepracer_coach_robomaker.py from. So make sure to check that folder exists, or change the contents of ~/.sagemaker/config.yaml to something that does exist. I have it set to a folder a couple directories up.
E.G mkdir -p ~/.sagemaker && cp config.yaml ~/.sagemaker.
To set some extra environment variables in Sagemaker SDK, until I figure out a better way, set the environemnt variable LOCAL_ENV_VAR_JSON_PATH to a env_vars.json. E.G export LOCAL_ENV_VAR_JSON_PATH=$(readlink -f ./env_vars.json).
Now you can run (cd rl_coach; python rl_deepracer_coach_robomaker.py) to start sagemaker.
Try python 3 updates / conda env
Look at building sagemaker manual script
Possibly python versioning as well?