Skip to content

Commit 3b91831

Browse files
committed
try with a postbuild file
1 parent ca4adb0 commit 3b91831

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

.binder/postBuild

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
echo "[postBuild] Editable install of local package"
5+
pip install -e .
6+
7+
echo "[postBuild] Warm up matplotlib font cache"
8+
python - <<'PY'
9+
import matplotlib.pyplot as plt # triggers font cache build
10+
print("Matplotlib imported; font cache built.")
11+
PY
12+
13+
echo "[postBuild] Warm up JupyterLab (pre-build static if needed)"
14+
jupyter lab build --minimize=False >/dev/null 2>&1 || true
15+
echo "[postBuild] Done"

.binder/requirements.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
rcpchgrowth[notebook]
1+
pandas
2+
matplotlib
3+
jupyterlab
4+
ipykernel
5+
scipy
6+
python-dateutil

.binder/start

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
#!/bin/bash
2-
# Start Jupyter in the correct directory
3-
exec jupyter lab --ContentsManager.root_dir=/home/jovyan
2+
set -euo pipefail
3+
echo "[start] Python: $(python -V)"
4+
echo "[start] rcpchgrowth import test:"
5+
python - <<'PY'
6+
import rcpchgrowth, os, sys
7+
print("rcpchgrowth version:", getattr(rcpchgrowth, "__version__", "?"))
8+
print("rcpchgrowth path:", rcpchgrowth.__file__)
9+
PY
10+
exec jupyter lab --ServerApp.root_dir=/home/jovyan --ServerApp.default_url=/lab

0 commit comments

Comments
 (0)