det-lab / jupyterhub-deploy-kubernetes-jetstream

CDMS JupyterHub deployment on XSEDE Jetstream
0 stars 1 forks source link

Providing latex and fonts for matplotlib #46

Closed pibion closed 3 years ago

pibion commented 3 years ago

Analyzers using matplotlib often want to format their axis titles with LaTeX and this requires dependencies that are not installed with the matplotlib package.

@bloer has considered putting these dependencies into CVMFS, but LaTeX isn't so easy to compile and we're considering instead installing the dependencies on some of the underlying systems, at least as a stopgap.

@zonca I just wanted to check in with this plan. I can edit the dockerfile at https://github.com/zonca/docker-jupyter-cdms-light and put in a pull request. I was wondering if we have a way of monitoring how long it takes instances to spin up? I'm worried the extra dependencies will make it take noticeably longer, and it's already fairly slow. It'd be nice to see histograms of what people encounter.

zonca commented 3 years ago

yes, you can add that in a pull request, I don't thing a few hundred MB are going to have a significant impact, I'll open a separate issue about spawning time.

zonca commented 3 years ago

implemented in https://github.com/zonca/docker-jupyter-cdms-light/pull/2 once it is built on dockerhub, I'll deploy it

zonca commented 3 years ago

ok, it built fine:

Install 4 Packages (+246 Dependent packages)
Total download size: 170 M
Installed size: 390 M

Image went from 1.26 to 1.39 GB, see https://hub.docker.com/repository/docker/zonca/docker-jupyter-cdms-light/tags?page=1&ordering=last_updated

pibion commented 3 years ago

Excellent, once it's redeployed I'll test with https://matplotlib.org/3.3.3/gallery/text_labels_and_annotations/tex_demo.html.

zonca commented 3 years ago

moved the docs about the single user image directly to the repository where it is easier to find: https://github.com/zonca/docker-jupyter-cdms-light/blob/master/README.md (also linked from previous location)

zonca commented 3 years ago

just deployed, consider that you need to stop and restart your container to have the image updated.

pibion commented 3 years ago

@zonca these docs suggest to me that once the new image is pushed to DockerHub, no further action is needed to pick up the changes on JupyterLab. Is that correct?

I'm getting "Failed to process string with tex because latex could not be found" when trying to make a plot with tex.

zonca commented 3 years ago

@pibion ok improved the docs.

you are using the old image, you need to stop and restart your container

pibion commented 3 years ago

It works!