From 6b4a50f387a731e685948a937720bcb9c52daa98 Mon Sep 17 00:00:00 2001 From: Eric Neilsen Date: Wed, 22 Nov 2023 08:24:36 -0800 Subject: [PATCH 1/2] serve scheduler_dashboard as schedview-snapshot/dashboard --- schedview/app/scheduler_dashboard/scheduler_dashboard.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/schedview/app/scheduler_dashboard/scheduler_dashboard.py b/schedview/app/scheduler_dashboard/scheduler_dashboard.py index 07744180..138cc5fd 100644 --- a/schedview/app/scheduler_dashboard/scheduler_dashboard.py +++ b/schedview/app/scheduler_dashboard/scheduler_dashboard.py @@ -1703,11 +1703,16 @@ def main(): def scheduler_app_with_params(): return scheduler_app(**commandline_args) + app_dict = {"dashboard": scheduler_app_with_params} + prefix = "/schedview-snapshot" + print(f"prefix: {prefix}, app_dict keys = {list(app_dict.keys())}") + pn.serve( - scheduler_app_with_params, + app_dict, port=scheduler_port, title="Scheduler Dashboard", - show=True, + show=False, + prefix=prefix, start=True, autoreload=True, threaded=True, From 9cd4c0f6af41033ed598165a1d1355820a0c411b Mon Sep 17 00:00:00 2001 From: Eric Neilsen Date: Wed, 22 Nov 2023 09:12:38 -0800 Subject: [PATCH 2/2] add test data to container --- Dockerfile | 4 ++++ container_environment.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3daf12e3..67e26f74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,10 @@ RUN micromamba install -y -n base -f /home/${MAMBA_USER}/schedview/container_env micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 RUN python -m pip install /home/$MAMBA_USER/schedview --no-deps +ARG TEST_DATA_DIR=/home/${MAMBA_USER}/schedview/test_data +ARG TEST_DATA_INDEX=https://s3df.slac.stanford.edu/data/rubin/sim-data/sched_pickles/test_snapshots.html +RUN mkdir -p ${TEST_DATA_DIR} && \ + wget --no-parent --directory-prefix=${TEST_DATA_DIR} --no-directories --recursive ${TEST_DATA_INDEX} # Container execution ENV RUBIN_SIM_DATA_DIR=/home/${MAMBA_USER}/schedview/rubin_sim_data diff --git a/container_environment.yaml b/container_environment.yaml index 2185f7ea..89e60a5d 100644 --- a/container_environment.yaml +++ b/container_environment.yaml @@ -16,3 +16,4 @@ dependencies: - param - git - pip + - wget