Compare commits

...

2 Commits

Author SHA1 Message Date
Mark 8c323dd0d1
Moved files 2022-10-09 21:02:56 -07:00
Mark 67b30b37cb
Added manim module 2022-10-09 21:02:49 -07:00
7 changed files with 49 additions and 8 deletions

View File

@ -19,9 +19,14 @@ 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`:
```
```python
c.ServerApp.local_hostnames = ["localhost", "0.0.0.0"]
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.
@ -29,7 +34,6 @@ 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.
## Image contents
- jupyterlab, jupyterhub, notebook
- latex + pandoc for exporting
@ -42,6 +46,7 @@ The second line sets a persistent token. If this config value is unset, jupyter
- numpy
- matplotlib
- pandas
- manim
- Octave
- R
- Julia

View File

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

View File

@ -45,20 +45,27 @@ echo ""
printf "Building base image...\n"
docker build \
--quiet=$is_quiet \
--build-arg PYTHON_VERSION=3.9 \
-t betalupi/jupyter-inter-0 \
$root_dir/base
printf "Done. \n\n"
build_image false octave
build_image false r
build_image false julia
#build_image false haskell (BROKEN)
#build_image false sage (BROKEN)
build_image false plugins
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
docker image tag betalupi/jupyter-inter-(math $img_idx) git.betalupi.com/mark/jupyter
docker image rm betalupi/jupyter-inter-(math $img_idx)

View File

@ -0,0 +1,31 @@
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
LABEL maintainer="Mark <mark@betalupi.com>"
USER ${NB_UID}
USER $NB_UID
RUN mamba install --yes \
# Python packages
@ -41,6 +41,7 @@ RUN mamba install --yes \
"xlrd" \
"tensorflow" \
"pytest" \
"ipython" \
&& \
# Cleanup
mamba clean --all -f -y && \