Skip to content

Ipyvolume  #15

@scrgiorgio

Description

@scrgiorgio

Would this work with ipyvolume?

I have this app.py:

import panel as pn
pn.extension(sizing_mode="stretch_width", template="fast")

pn.state.template.param.update(
    site_url="https://awesome-panel.org",
    site="Awesome Panel",
    title="Hello World",
    favicon="https://raw.githubusercontent.com/MarcSkovMadsen/awesome-panel-assets/320297ccb92773da099f6b97d267cc0433b67c23/favicon/ap-1f77b4.ico",
)

import ipyvolume as ipv
import numpy as np
pn.config.css_files.append("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css")

import ipyvolume as ipv
fig = ipv.figure()
V = np.zeros((128,128,128)) 
V[30:-30,30:-30,30:-30] = 0.75
V[35:-35,35:-35,35:-35] = 0.0
V[50:-50,50:-50,50:-50] = 0.25
V[55:-55,55:-55,55:-55] = 0.0
ipv.volshow(V, level=[0.25, 0.75], opacity=0.03, level_width=0.1, data_min=0, data_max=1)
ipv.view(90, 0)

pn.panel(fig).servable()

With requirements:

awesome-panel-extensions
black
invoke
isort
mypy
pandas
panel~=0.14
pylint
numpy
scikit-image
ipyvolume==0.6.0
ipython_genutils
ipywidgets_bokeh

I did:

python3 -m pip install -r requirements.txt -U
panel convert src/myapp/app.py --to pyodide-worker --out docs/myapp
# NO ERRORS so far
python3 -m http.server
#  open this in Chrome http://localhost:8000/docs/myapp/app.html

But it's saying it Can't find a pure Python 3 wheel for 'tornado>=6.1'..
I think I made it work on JupyterLite (by patching ipyvolume) but I cannot make it work as a Panel serverless dashboard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions