docker-stacks
docker-stacks copied to clipboard
[ENH] - Remove inkscape
What docker image(s) is this feature applicable to?
minimal-notebook
What changes are you proposing?
Remove inkscape from minimal-notebook.
How does this affect the user?
Smaller size; less dependencies.
Images based on minimal-notebook will profit, too.
Anything else?
See also https://github.com/JuliaLang/IJulia.jl/pull/1038#issuecomment-1194523666 on how to configure IPython and IRkernel
to output both
image/svg+xmlandapplication/pdfplot formats in the notebook file:
image/svg+xmlfor plot display in the browser + HTML conversion using SVG instead of PNGapplication/pdffor direct PDF conversionℹ️ With
application/pdfplot format in the notebook file,inkscapeis not required for PDF conversion usingnbconvert.
👉 I am asking for help @JuliaLang as I have not found solution for IJulia yet.
Possible side-effect of using image/svg+xml + application/pdf instead of image/png: See https://nbviewer.org/github/mgeier/python-audio/blob/master/plotting/matplotlib-inline-defaults.ipynb.
Do you think some users are expecting the PDF functionality in the minimal-notebook?
Do you think some users are expecting the PDF functionality in the
minimal-notebook?
Not necessarily.
But all dependencies other than pandoc (base-notebook) required by nbconvert are installed in the minimal-notebook: https://github.com/jupyter/docker-stacks/blob/0be9e335026b21a452c888481ab6341dcdd183a5/minimal-notebook/Dockerfile#L31-L35
inkscape (79.2 MB) depends on many other packages (109 MB) including python2. Getting rid of inkspace would reduce
- the image size by 178.2 MB and
- the number of packages by 1+86
ℹ️ The minimal-notebook currently contains three versions of python:
/opt/conda/bin/python3.10/usr/bin/python3.8- required by
texlive-xetex
- required by
/usr/bin/python2.7- required by
inkscape
- required by
👉 To further optimize the minimal-notebook: texlive-xetex, texlive-fonts-recommended and texlive-plain-generic could be replaced by a variation of TinyTeX.
@benz0li I would suggest creating a PR and see what the community reaction is to this change.
I would tag @parente on this PR since he added inkscape based on this issue.
We have a test for nbconvert https://github.com/jupyter/docker-stacks/blob/main/tests/minimal-notebook/test_nbconvert.py.
I guess if it works without Inkscape, then we should be fine removing it.
@benz0li I would suggest creating a PR and see what the community reaction is to this change.
I am maintaining my own Docker Stacks based on Debian, Python-only, including code-server. ℹ️ Just sharing my findings with the community. It is up the developers @jupyter what to do.
To me, the findings in https://github.com/jupyter/docker-stacks/issues/1754#issuecomment-1195484696 is a very strong case for removing inkscape.
For the sustainability of this project, cleaning up legacy packages parts as times goes is relevant. I figure anything that installs dedicated python versions is extra costly and if users depending on such could switch to something else it would be impactful.
It seems to me that inkscapes is a vector graphics graphical editor, not sure how it makes sense to provide that in this container unless its used with a remote desktop setup.
@mathbunnyru @consideRatio If you remove inkscape, do not forget to configure IPython and IRkernel to output both image/svg+xml and application/pdf plot formats in the notebook file.
ℹ️ See https://github.com/JuliaLang/IJulia.jl/pull/1038#issuecomment-1194523666 for more information.
👉 And https://nbviewer.org/github/mgeier/python-audio/blob/master/plotting/matplotlib-inline-defaults.ipynb about possible side-effects.
I have not found solution for IJulia yet.
Fixed in https://github.com/jupyter/docker-stacks/pull/1765