#!/bin/bash

# This script will first run pip install with the requirements file specified
# by $PIP_REQUIREMENTS_FILE, and then execute any command line arguments.


if [[ -n "$PIP_REQUIREMENTS_FILE" ]]; then
  pip install -r "$PIP_REQUIREMENTS_FILE" \
    | grep -v '^Requirement already satisfied' \
    || true
else
  echo " -> No \$PIP_REQUIREMENTS_FILE set!"
fi

exec "$@"
