Skip to content

Commit

Permalink
Improved help if DR_SIMAPP_SOURCE and VERSION not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
larsll committed Jul 16, 2024
1 parent fb67e3b commit a46ef50
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions bin/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,19 @@ if [[ -n "${DR_MINIO_COMPOSE_FILE}" ]]; then
fi

## Version check
if [[ -z "$DR_SIMAPP_SOURCE" ]]; then
echo "ERROR: Variable DR_SIMAPP_SOURCE not defined."
fi
if [[ -z "$DR_SIMAPP_VERSION" ]]; then
echo "ERROR: Variable DR_SIMAPP_VERSION not defined."
if [[ -z "$DR_SIMAPP_SOURCE" || -z "$DR_SIMAPP_VERSION" ]]; then
DEFAULT_SIMAPP_VERSION=$(jq -r '.containers.simapp | select (.!=null)' $DIR/defaults/dependencies.json)
echo "ERROR: Variable DR_SIMAPP_SOURCE or DR_SIMAPP_VERSION not defined."
echo ""
echo "As of version 5.3 the variables DR_SIMAPP_SOURCE and DR_SIMAPP_VERSION are required in system.env."
echo "To continue to use the separate Sagemaker, Robomaker and RL Coach images, run 'git checkout legacy'."
echo ""
echo "Please add the following lines to your system.env file:"
echo "DR_SIMAPP_SOURCE=awsdeepracercommunity/deepracer-simapp"
echo "DR_SIMAPP_VERSION=${DEFAULT_SIMAPP_VERSION}-gpu"
return
fi

DEPENDENCY_VERSION=$(jq -r '.master_version | select (.!=null)' $DIR/defaults/dependencies.json)

SIMAPP_VER=$(docker inspect ${DR_SIMAPP_SOURCE}:${DR_SIMAPP_VERSION} 2>/dev/null | jq -r .[].Config.Labels.version)
Expand Down

0 comments on commit a46ef50

Please sign in to comment.