#!/bin/sh # Exit immediately if a command exits with a non-zero status. set -e echo "Starting in APP_MODE: $APP_MODE" # --- Start the app based on mode --- if [ "$APP_MODE" = "lambda" ]; then echo "Starting in Lambda mode..." # The CMD from Dockerfile will be passed as "$@" exec python -m awslambdaric "$@" else echo "Starting in Gradio mode..." exec python app.py fi