Compare commits

..

No commits in common. "8c323dd0d1fe56dc3db3edf50aa6f9437f980300" and "e42d845d5adac38e52ee16f5e73de20e96e63ef5" have entirely different histories.

7 changed files with 8 additions and 49 deletions

View File

@ -19,14 +19,9 @@ Change the permissions on the configuration volume (see `docker-compose.yml`) if
You may want to add the following lines to `jupyter_notebook_config.py`: You may want to add the following lines to `jupyter_notebook_config.py`:
```python ```
c.ServerApp.local_hostnames = ["localhost", "0.0.0.0"] c.ServerApp.local_hostnames = ["localhost", "0.0.0.0"]
c.ServerApp.token = "a_long_random_string" c.ServerApp.token = "a_long_random_string"
c.TagRemovePreprocessor.enabled = True
c.TagRemovePreprocessor.remove_cell_tags = ("hide_cell",)
c.TagRemovePreprocessor.remove_all_outputs_tags = ("hide_output",)
c.TagRemovePreprocessor.remove_input_tags = ("hide_input",)
``` ```
The first sets `0.0.0.0` to the allowed local hostname list. This prevents a possible "connection reset" when connecting to the docker container. Opens jupyter up to the outside internet, but you should have your inbound ports firewalled off anyway. The first sets `0.0.0.0` to the allowed local hostname list. This prevents a possible "connection reset" when connecting to the docker container. Opens jupyter up to the outside internet, but you should have your inbound ports firewalled off anyway.
@ -34,6 +29,7 @@ The first sets `0.0.0.0` to the allowed local hostname list. This prevents a pos
The second line sets a persistent token. If this config value is unset, jupyter will generate a new one on each run, making it hard to make a one-click bookmark. The second line sets a persistent token. If this config value is unset, jupyter will generate a new one on each run, making it hard to make a one-click bookmark.
## Image contents ## Image contents
- jupyterlab, jupyterhub, notebook - jupyterlab, jupyterhub, notebook
- latex + pandoc for exporting - latex + pandoc for exporting
@ -46,7 +42,6 @@ The second line sets a persistent token. If this config value is unset, jupyter
- numpy - numpy
- matplotlib - matplotlib
- pandas - pandas
- manim
- Octave - Octave
- R - R
- Julia - Julia

View File

@ -48,7 +48,10 @@ RUN apt-get update --yes && \
# pandoc: convert notebooks to html # pandoc: convert notebooks to html
# texlive-*: for nbconvert # texlive-*: for nbconvert
pandoc \ pandoc \
texlive-full \ texlive \
texlive-xetex \
texlive-fonts-recommended \
texlive-plain-generic \
# Misc dependencies # Misc dependencies
# build-essential: for cython # build-essential: for cython
# cm-super, dvipng: for latex labels # cm-super, dvipng: for latex labels

View File

@ -45,27 +45,20 @@ echo ""
printf "Building base image...\n" printf "Building base image...\n"
docker build \ docker build \
--quiet=$is_quiet \ --quiet=$is_quiet \
--build-arg PYTHON_VERSION=3.9 \
-t betalupi/jupyter-inter-0 \ -t betalupi/jupyter-inter-0 \
$root_dir/base $root_dir/base
printf "Done. \n\n" printf "Done. \n\n"
build_image false octave build_image false octave
build_image false r build_image false r
build_image false julia build_image false julia
#build_image false haskell (BROKEN)
#build_image false sage (BROKEN) #build_image false sage (BROKEN)
build_image false plugins build_image false plugins
build_image false pymodules build_image false pymodules
# Manim will not install under python 3.10.
# 3.9 works (see arguments for base above)
build_image false manim
# Rename final image # Rename final image
docker image tag betalupi/jupyter-inter-(math $img_idx) git.betalupi.com/mark/jupyter docker image tag betalupi/jupyter-inter-(math $img_idx) git.betalupi.com/mark/jupyter
docker image rm betalupi/jupyter-inter-(math $img_idx) docker image rm betalupi/jupyter-inter-(math $img_idx)

View File

@ -1,31 +0,0 @@
ARG BASE_CONTAINER=betalupi/jupyter-base
FROM $BASE_CONTAINER
LABEL maintainer="Mark <mark@betalupi.com>"
USER root
RUN apt-get update --yes && apt-get install --yes --no-install-recommends \
# Manim dependencies
libcairo2-dev \
libpango1.0-dev \
ffmpeg \
dvisvgm \
&& \
apt-get clean && rm -rf /var/lib/apt/lists/*
USER $NB_UID
# Manim will not install under python 3.10
# as of 2022-10-09
RUN mamba install --yes \
"manim" \
&& \
# Cleanup
mamba clean --all -f -y && \
npm cache clean --force && \
jupyter lab clean && \
rm -rf "/home/${NB_USER}/.cache/yarn" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

View File

@ -2,7 +2,7 @@ ARG BASE_CONTAINER=betalupi/jupyter-base
FROM $BASE_CONTAINER FROM $BASE_CONTAINER
LABEL maintainer="Mark <mark@betalupi.com>" LABEL maintainer="Mark <mark@betalupi.com>"
USER $NB_UID USER ${NB_UID}
RUN mamba install --yes \ RUN mamba install --yes \
# Python packages # Python packages
@ -41,7 +41,6 @@ RUN mamba install --yes \
"xlrd" \ "xlrd" \
"tensorflow" \ "tensorflow" \
"pytest" \ "pytest" \
"ipython" \
&& \ && \
# Cleanup # Cleanup
mamba clean --all -f -y && \ mamba clean --all -f -y && \