Open Jean-Baptiste-Lasselle opened 9 months ago
I have the same issue when using Deno from the Ubuntu Docker image, [denoland/deno:ubuntu-1.41.0]. Is there some reason you don't use their official docker images (https://hub.docker.com/r/denoland/deno) ? I'm new to Deno and I'm asking to see if I missed something.
In my case this fails with the same message when trying to import from skia_canvas.
I see on their repo the make an explicit note to use specific flags allowing unstable ffi content but I could not use that with Jupyter. https://github.com/DjDeveloperr/skia_canvas?tab=readme-ov-file#usage
I also see that the Deno-Jupyter-D3 combination has been working in the past since this code is present in multiple example articles.
articles
Hello @sergiunagy thank you for your message:
I have the same issue when using Deno from the Ubuntu Docker image, [denoland/deno:ubuntu-1.41.0]. Is there some reason you don't use their official docker images (https://hub.docker.com/r/denoland/deno) ? I'm new to Deno and I'm asking to see if I missed something.
In my case this fails with the same message when trying to import from skia_canvas.
I see on their repo the make an explicit note to use specific flags allowing unstable ffi content but I could not use that with Jupyter. https://github.com/DjDeveloperr/skia_canvas?tab=readme-ov-file#usage
I also see that the Deno-Jupyter-D3 combination has been working in the past since this code is present in multiple example articles.
add on : ouh oh my, you must pass --allow-env
, --allow-ffi
and --unstable-ffi
flags , i will try using together all 3, i haven't tested that yet, thanks for the ref @sergiunagy !
I have the same issue when using Deno from the Ubuntu Docker image, [denoland/deno:ubuntu-1.41.0]. Is there some reason you don't use their official docker images (https://hub.docker.com/r/denoland/deno) ? I'm new to Deno and I'm asking to see if I missed something.
In my case this fails with the same message when trying to import from skia_canvas.
I see on their repo the make an explicit note to use specific flags allowing unstable ffi content but I could not use that with Jupyter. https://github.com/DjDeveloperr/skia_canvas?tab=readme-ov-file#usage
I also see that the Deno-Jupyter-D3 combination has been working in the past since this code is present in multiple example articles.
Hello again @sergiunagy , a bit more to answer you:
denoland/deno
you mention, the typescript/deno source code you talk about is executed directly by deno. But in my case, I want to execute the same source code (involving skia_canvas
), but in a jupyter
notebook, with a deno
kernel. In denoland/deno
, there is nothing related to jupyter at all, it is just a bare deno
runtime. skia_canvas
source code we are interested in.jupyter
app, inside a container, is done running a jupyter
command, would it make sense to feed the jupyter command, deno GNU options? Well, you can see below a few tests I have performed, all ended up either jupyter failing to start, or the skaia_canvas
causing the same ffi
related error :#!/bin/bash
export PATH="$PATH:$HOME/.cargo/bin"
source ~/.bashrc
pwd
cargo --version
deno --version
# KO # deno jupyter --install --unstable-ffi --allow-ffi --allow-env
# KO # deno jupyter --install --unstable-ffi --allow-env
# OK but does not fix [ffi dl open] error # deno jupyter --install --unstable-ffi --unstable --unstable-fs --unstable-worker-options
deno jupyter --install --unstable-ffi --unstable-fs # without [--unstable] which is deprecated for [--unstable-*] options
# deno jupyter --install --unstable-ffi
# tested works # jupyter notebook --unstable true --ip 0.0.0.0 --allow-root
export NOTEBOOKS_DIR=$DATAVIZ_NOTEBOOKS_HOME
# OK # jupyter lab --unstable=true --ip=0.0.0.0 --allow-root --NotebookApp.token='decoderleco' --NotebookApp.password='decoderleco' --notebook-dir="$NOTEBOOKS_DIR"
# KO # jupyter-lab: error: unrecognized arguments: --unstable-ffi=true --unstable-fs=true # jupyter lab --unstable=true --unstable-ffi=true --unstable-fs=true --ip=0.0.0.0 --allow-root --NotebookApp.token='decoderleco' --NotebookApp.password='decoderleco' --notebook-dir="$NOTEBOOKS_DIR"
# KO # jupyter-lab: error: unrecognized arguments: --unstable-ffi --unstable-fs # jupyter lab --unstable=true --unstable-ffi --unstable-fs --ip=0.0.0.0 --allow-root --NotebookApp.token='decoderleco' --NotebookApp.password='decoderleco' --notebook-dir="$NOTEBOOKS_DIR"
jupyter lab --unstable=true --ip=0.0.0.0 --allow-root --NotebookApp.token='decoderleco' --NotebookApp.password='decoderleco' --notebook-dir="$NOTEBOOKS_DIR"
Finally, I could do some more tests, finding out how one can configure jupyter to pass arguments and options to a jupyter kernel. But if it does not work with a bare deno, there is not one chance it would as a jupyter kernel: so trygin tests with a bare deno runtime is lighter, ad faster.
Now the question is : what more tests can we do ?
I say this:
--unstable-ffi
: it means this ffi feature might disappear anytime in future versions of deno. This also means that iff it does not work with todays latest version of deno, it certainly was working in a previous version of deno : at the date the article/blog posts were pulblished, what was the latest version of deno
...?libffi-dev
and a few others, might be required, and are missing in some containersWDYT?
Could we join efforts to design a whole set of tests and catch this animal together ? the question and reached hand is meant at all readers as well.
ps:
For the reference:
It does indeed seem like there is currently no way to configure the Jupyter Kernel with --unstable
flags - I'll mark this as a bug.
Issue Description
Hello awesome
deno
team, I recently am running a jupyter/deno notebook, inside a container.I designed the
Dockerfile
myself, and in my notebook, I try and use an HTML canvas. As I do so, I stumble upon an issue I caan't fathom how to solve.First, here is the startup script I use as
CMD
in my docker file:The error I get as I execute my notebook is visible in the webbrowser, and no error shows up in my docker container logs (as you can see, it definitely is the canvas deno which throws the error) :
Note:
--unstable
option flag.Dockerfile
, I install the kernel withdeno jupyter --install --unstable
, also as instructed by the deno docsdeno jupyter --install --unstable-ffi
kernel installation command (and i kept thedeno jupyter --install --unstable
in myDockerfile
): I still get the exact same errorDockerfile
(debian based), thelibffi-dev
package.Dockerfile
, I am in a GNU/linux Debian , plus i run the container on a GNU/Linux Debian VM.The Dockerfile
please forgive me for it is messy, I'm in an early stage: