File size: 534 Bytes
7b6ea11
 
 
 
1451908
7b6ea11
35f9ed9
 
7b6ea11
 
 
 
 
35f9ed9
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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'