https://gitlab.inria.fr/jrye/mlflow-extra.git
Tip revision: 736f37ee72597e8653b2d26e1cd09f0af60fd2aa authored by Jan-Michael Rye on 27 November 2023, 19:19:43 UTC
Restrict CI to main branch
Restrict CI to main branch
Tip revision: 736f37e
install.sh
#!/usr/bin/env bash
set -euo pipefail
SELF=$(readlink -f "${BASH_SOURCE[0]}")
DIR=${SELF%/*/*}
function show_help()
{
cat << HELP
SYNOPSIS
Install the MLflow Extra package with pip.
USAGE
${0##*/} [-h] [-u] [path]
"path" is an optional path to a virtual environment.
OPTIONS
-h
Show this help message and exit.
-u
Upgrade pip and the target package.
HELP
}
upgrade=false
while getopts 'hu' flag
do
case "$flag" in
u) upgrade=true ;;
h) show_help 0 ;;
*) show_help 1 ;;
esac
done
shift $((OPTIND - 1))
if [[ -n ${1:+x} ]]
then
venv_dir=$(readlink -f "$1")
mkdir -p -- "$venv_dir"
python3 -m venv "$venv_dir"
source "$venv_dir/bin/activate"
fi
if $upgrade
then
pip3 install --upgrade pip
fi
pip3 install --upgrade "$DIR"
