#!/bin/sh

set -eu

. ./_mlflow_config_common.sh

DEFAULT_ARTIFACT_ROOT="./mlflow/mlartifacts/"

: "${MLFLOW_PORT:=5000}"

mkdir -p "${DEFAULT_ARTIFACT_ROOT}"

exec mlflow server \
    --backend-store-uri="$BACKEND_URI"  \
    --default-artifact-root="$DEFAULT_ARTIFACT_ROOT" \
    -p "$MLFLOW_PORT"
