Jupyter Notebook Support
-
I'd like to have jupyter notebook support baked into the container image shipped by Cloudron. I can get it working as-is, but I'd really prefer the jupyter python code be shipped in the read-only filesystem and also updated whenever the gitea app is updated.
Gitea has some good docs on how to do this:
https://docs.gitea.io/en-us/external-renderers/#installing-external-binaries
I was able to get this working on my existing instance by:
mkdir /app/data/python_packages cd /app/data/python_packages python3 -m virtualenv . source bin/activate pip3 install jupyter
And then adding the following to my
/app/data/app.ini
file:[markup.jupyter] ENABLED = true FILE_EXTENSIONS = .ipynb RENDER_COMMAND = "/app/data/python_packages/bin/jupyter nbconvert --stdin --stdout --to html --template basic" IS_INPUT_FILE = false [markup.sanitizer.jupyter.img] ALLOW_DATA_URI_IMAGES = true
I think all you'd have to add to the
Dockerfile
is something like:RUN pip3 install jupyter
And then make the changes to the app.ini.template (without the path prefix on the render command, since it would be in the path now).
I'd be happy to submit and test a pull request against the repository if that would be easiest.
While at it...could probably also add pandoc so that we can add our own custom markup types for anything pandoc supports.
-
@ocelotsloth yes, please, if you create a PR, we can get it merged. The repo is at https://git.cloudron.io/cloudron/gitea-app
-
@ocelotsloth done! you should have permissions to create many repos now.
-
@girish ok merge request here: https://git.cloudron.io/cloudron/gitea-app/-/merge_requests/6
This app install is running that code: https://testgitea.markstenglein.com/ocelotsloth/test/src/branch/master/test.ipynb
-
@ocelotsloth thanks, merged! will publish shortly.