Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD: Add binder files for LROSE #5

Merged
merged 3 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ copyright: "2024"

execute:
# To execute notebooks via a Binder instead, replace 'cache' with 'binder'
execute_notebooks: cache
execute_notebooks: binder
timeout: 600
allow_errors: False # cells with expected failures must set the `raises-exception` cell tag

Expand Down
21 changes: 21 additions & 0 deletions binder/appendix.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && \
wget -q -O /tmp/lrose.deb https://github.com/NCAR/lrose-core/releases/download/lrose-core-20240410/lrose-core-20240410.ubuntu_22.04.amd64.deb && \
apt-get -y install /tmp/lrose.deb && \
apt-get clean && \
rm -rf /tmp/lrose.deb

USER ${NB_USER}
RUN CONDA_DIR=/srv/conda && \
RADARENV=notebook && \
CONDA_PREFIX=$CONDA_DIR/envs/$RADARENV && \
export PROJ_NETWORK=ON && \
export BALTRAD_INSTALL_ROOT=${PWD} && \
echo "export CONDA_DIR=$CONDA_DIR" >> ~/.profile && \
echo "export RADARENV=$RADARENV" >> ~/.profile && \
echo "export CONDA_PREFIX=$CONDA_PREFIX" >> ~/.profile && \
echo "export PROJ_NETWORK=$PROJ_NETWORK" >> ~/.profile && \
${CONDA_PREFIX}/bin/bash -l $BALTRAD_INSTALL_ROOT/install/baltrad/install_baltrad.sh && \
${CONDA_PREFIX}/bin/bash -l $BALTRAD_INSTALL_ROOT/install/nbstripout_notebooks.sh && \
cp binder/kernel.json $CONDA_PREFIX/share/jupyter/kernels/python3/.
8 changes: 8 additions & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: cookbook-dev
channels:
- conda-forge
dependencies:
- jupyter-book
- jupyterlab
- jupyter_server
- sphinx-pythia-theme
13 changes: 13 additions & 0 deletions binder/kernel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"argv": [
"/srv/conda/envs/notebook/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python",
"env": {"LD_LIBRARY_PATH":":/srv/conda/envs/notebook/lib:/srv/conda/envs/notebook/hlhdf/lib:/srv/conda/envs/notebook/rave/lib:/srv/conda/envs/notebook/beamb/lib:/srv/conda/envs/notebook/bropo/lib:/srv/conda/envs/notebook/baltrad-wrwp/lib",
"PATH": ":/srv/conda/envs/notebook/bin:/srv/conda/condabin:/home/jovyan/.local/bin:/home/jovyan/.local/bin:/srv/conda/envs/notebook/bin:/srv/conda/bin:/srv/npm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/srv/conda/envs/notebook/hlhdf/bin:/srv/conda/envs/notebook/rave/bin:/srv/conda/envs/notebook/beamb/bin:/srv/conda/envs/notebook/bropo/bin:/srv/conda/envs/notebook/baltrad-wrwp/bin"}
}
Loading