Skip to content

Commit f39d903

Browse files
Sync from debuggingbook
1 parent 7123fa3 commit f39d903

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

binder/Dockerfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ FROM docker.io/library/buildpack-deps:jammy
2626
ARG PROJECT=fuzzingbook
2727
ARG REPO=https://github.com/uds-se/${PROJECT}.git
2828

29+
# Meta-data
30+
LABEL description="$(PROJECT).org image from $(REPO)"
31+
2932
# Install git and pip
3033
RUN apt-get update
3134
RUN apt-get install -y git python3 pip npm gcc
@@ -37,6 +40,9 @@ RUN echo "This is ${PROJECT} with $(python3 --version)" 1>&2
3740
RUN pip install --no-cache --upgrade pip && \
3841
pip install --no-cache notebook jupyterlab
3942

43+
# Install mermaid
44+
RUN npm i -g mermaid
45+
4046
# Add the default user
4147
ARG NB_USER=jovyan
4248
ARG NB_UID=1000
@@ -70,7 +76,8 @@ USER ${NB_USER}
7076
ENV PATH="/home/${NB_USER}/.local/bin:$PATH"
7177

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

binder/postBuild.template

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
#!/bin/bash
22

33
# Enable incompatible extensions
4-
echo postBuild: Enabling incompatible Jupyter extensions...
5-
NBCONFIG_PATH=$HOME/.jupyter/nbconfig
6-
mkdir -p $NBCONFIG_PATH
7-
echo '{
8-
"nbext_hide_incompat": false
9-
}' > $NBCONFIG_PATH/common.json
4+
# echo postBuild: Enabling incompatible Jupyter extensions...
5+
# NBCONFIG_PATH=$HOME/.jupyter/nbconfig
6+
# mkdir -p $NBCONFIG_PATH
7+
# echo '{
8+
# "nbext_hide_incompat": false
9+
# }' > $NBCONFIG_PATH/common.json
1010

1111
# Install and enable Jupyter nbextensions
1212
# https://github.com/binder-examples/jupyter-extension
1313
# https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html
14-
echo postBuild: Installing Jupyter extensions...
15-
jupyter contrib nbextension install --user
16-
jupyter nbextension enable toc2/main --user
17-
jupyter nbextension enable exercise2/main --user
18-
jupyter nbextensions_configurator enable --user
19-
jupyter nbextension list
14+
# echo postBuild: Installing Jupyter extensions...
15+
# jupyter contrib nbextension install --user
16+
# jupyter nbextension enable toc2/main --user
17+
# jupyter nbextension enable exercise2/main --user
18+
# jupyter nbextensions_configurator enable --user
19+
# jupyter nbextension list
2020

2121
# Install and enable Jupyter lab extensions
2222
echo postBuild: Installing Jupyter Lab extensions...
2323
pip install jupyterlab-markup # Mermaid in Jupyter Lab
24-
jupyter labextension enable @agoose77/jupyterlab-markup
25-
jupyter labextension install jupyterlab-cell-flash
26-
jupyter labextension list
24+
pip install jupyterlab-cell-flash
25+
jupyter lab build
2726

2827
# Install grcov
2928
echo postBuild: Installing grcov...
3029
cargo install grcov
3130

32-
# Install mermaid
31+
# # Install mermaid
3332
echo postBuild: Installing mermaid...
34-
npm i -g mermaid
33+
npm i mermaid
3534

3635
# run matplotlib once to generate the font cache
3736
echo postBuild: Generating matplotlib font cache...

0 commit comments

Comments
 (0)