mlflow / start.sh
stavag's picture
Upload folder using huggingface_hub
35f9ed9 verified
Raw
History Blame Contribute Delete
534 Bytes
#!/usr/bin/env bash
set -euo pipefail
DATA_DIR="${MLFLOW_DATA_DIR:-/data}"
mkdir -p "${DATA_DIR}/mlartifacts"
# NONE: HF Spaces embeds the app in an iframe from huggingface.co
# (default SAMEORIGIN → "refused to connect" on the Spaces page).
exec mlflow server \
--host 0.0.0.0 \
--port 7860 \
--backend-store-uri "sqlite:///${DATA_DIR}/mlflow.db" \
--default-artifact-root "${DATA_DIR}/mlartifacts" \
--allowed-hosts '*' \
--x-frame-options NONE \
--cors-allowed-origins 'https://huggingface.co,https://*.hf.space'