Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Jupyter Notebook Support

Scheduled Pinned Locked Moved Solved Gitea
6 Posts 2 Posters 10.3k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ocelotslothO Offline
    ocelotslothO Offline
    ocelotsloth
    wrote on last edited by ocelotsloth
    #1

    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.

    girishG 1 Reply Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    replied to ocelotsloth on last edited by
    #2

    @ocelotsloth yes, please, if you create a PR, we can get it merged. The repo is at https://git.cloudron.io/cloudron/gitea-app

    ocelotslothO 1 Reply Last reply
    0
  • ocelotslothO Offline
    ocelotslothO Offline
    ocelotsloth
    replied to girish on last edited by ocelotsloth
    #3

    @girish looks like I need permissions to create at least 1 repository in order to do that.

    If you can make that change for me I'll work on this tomorrow night.

    girishG 1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    replied to ocelotsloth on last edited by
    #4

    @ocelotsloth done! you should have permissions to create many repos now.

    ocelotslothO 1 Reply Last reply
    0
  • ocelotslothO Offline
    ocelotslothO Offline
    ocelotsloth
    replied to girish on last edited by
    #5

    @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

    girishG 1 Reply Last reply
    2
  • girishG Offline
    girishG Offline
    girish Staff
    replied to ocelotsloth on last edited by
    #6

    @ocelotsloth thanks, merged! will publish shortly.

    1 Reply Last reply
    1

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.