Created
December 6, 2024 19:03
-
-
Save sparticlesteve/0d11edbd22fdc625e234f4d2b4eafac6 to your computer and use it in GitHub Desktop.
Helper script for starting and viewing MLflow server from NERSC JupyterHub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# - Go to https://jupyter.nersc.gov and start a server (e.g. login node) | |
# - Start a terminal from the launcher | |
# - Load your environment with mlflow installed and run this script: | |
# conda activate <my environment> | |
# ./start_mlflow.sh | |
# - Wait a few seconds for the server to start, then open the URL that is printed by the script. | |
port=${MLFLOW_PORT:-8123} | |
if [ ! -z $JUPYTERHUB_SERVICE_PREFIX ]; then | |
jupyter_url="https://jupyter.nersc.gov${JUPYTERHUB_SERVICE_PREFIX}proxy/${port}/" | |
echo "Once it starts, your MLflow server will be viewable at ${jupyter_url}" | |
fi | |
set -x | |
mlflow server -p $port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment