Skip to content

Commit

Permalink
Sync from debuggingbook
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-zeller committed Jun 30, 2024
1 parent 7123fa3 commit f39d903
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
9 changes: 8 additions & 1 deletion binder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ FROM docker.io/library/buildpack-deps:jammy
ARG PROJECT=fuzzingbook
ARG REPO=https://github.com/uds-se/${PROJECT}.git

# Meta-data
LABEL description="$(PROJECT).org image from $(REPO)"

# Install git and pip
RUN apt-get update
RUN apt-get install -y git python3 pip npm gcc
Expand All @@ -37,6 +40,9 @@ RUN echo "This is ${PROJECT} with $(python3 --version)" 1>&2
RUN pip install --no-cache --upgrade pip && \
pip install --no-cache notebook jupyterlab

# Install mermaid
RUN npm i -g mermaid

# Add the default user
ARG NB_USER=jovyan
ARG NB_UID=1000
Expand Down Expand Up @@ -70,7 +76,8 @@ USER ${NB_USER}
ENV PATH="/home/${NB_USER}/.local/bin:$PATH"

# Set up the conda environment
# (Skipping for now, as installing conda is hard)
# (Skipping for now, as installing conda is hard,
# and apparently we can do without)
# RUN conda env create -f binder/environment.yml
# RUN conda activate myenv

Expand Down
33 changes: 16 additions & 17 deletions binder/postBuild.template
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
#!/bin/bash

# Enable incompatible extensions
echo postBuild: Enabling incompatible Jupyter extensions...
NBCONFIG_PATH=$HOME/.jupyter/nbconfig
mkdir -p $NBCONFIG_PATH
echo '{
"nbext_hide_incompat": false
}' > $NBCONFIG_PATH/common.json
# echo postBuild: Enabling incompatible Jupyter extensions...
# NBCONFIG_PATH=$HOME/.jupyter/nbconfig
# mkdir -p $NBCONFIG_PATH
# echo '{
# "nbext_hide_incompat": false
# }' > $NBCONFIG_PATH/common.json

# Install and enable Jupyter nbextensions
# https://github.com/binder-examples/jupyter-extension
# https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html
echo postBuild: Installing Jupyter extensions...
jupyter contrib nbextension install --user
jupyter nbextension enable toc2/main --user
jupyter nbextension enable exercise2/main --user
jupyter nbextensions_configurator enable --user
jupyter nbextension list
# echo postBuild: Installing Jupyter extensions...
# jupyter contrib nbextension install --user
# jupyter nbextension enable toc2/main --user
# jupyter nbextension enable exercise2/main --user
# jupyter nbextensions_configurator enable --user
# jupyter nbextension list

# Install and enable Jupyter lab extensions
echo postBuild: Installing Jupyter Lab extensions...
pip install jupyterlab-markup # Mermaid in Jupyter Lab
jupyter labextension enable @agoose77/jupyterlab-markup
jupyter labextension install jupyterlab-cell-flash
jupyter labextension list
pip install jupyterlab-cell-flash
jupyter lab build

# Install grcov
echo postBuild: Installing grcov...
cargo install grcov

# Install mermaid
# # Install mermaid
echo postBuild: Installing mermaid...
npm i -g mermaid
npm i mermaid

# run matplotlib once to generate the font cache
echo postBuild: Generating matplotlib font cache...
Expand Down

0 comments on commit f39d903

Please sign in to comment.