Open djangofan opened 5 years ago
I don't have a lot of time to spare at the moment, but I'll look into it.
It should be a straight-forward job, since we already have the Dockerfile here (thanks to @parmentelat ).
Take a look at the repository joequant/bitquant and the image joequant/bitstation on dockerhub
It's a repository with a lot of bells and whistles including ijavascript
The docker hub repo joequant/bitstation Dockerfile makes no mention of Javascript and so if it supports Javascript, it is not at all obvious (in the way that jupyter-docker-stacks makes it obvious what it supports). That being the case, I hope n-riesco might glean helpful info from it, towards making a Dockerized ijavascript ?
Seems the docker file won't work with mybinder.org. Notebook started without javascript kernel.
And when test with most recent 2 releases from docker build, it stuck at: sh -c node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)
Has there been any movement on this. It would be very convenient to build this into the CI pipeline
@nishtahir No, sorry, I'll bump it up on my TODO list.
In looking into this a bit, I found a couple points:
There are a few instances that have iJavascript referenced on hub.docker.com, the biggest one being datainpoint/ijavascript-notebook
This works really well, but is referencing a version of jupyterlab that is about 2 years old now.
(You can see from the Dockerfile here: https://hub.docker.com/r/datainpoint/ijavascript-notebook/Dockerfile)
I tried updating the image to work with a newer version of jupyterlab, but it seems that it uses tslab
- and when it compiles it has a problem with libzmq3
that I just couldn't get around. (It was missing cmake
and curl
, and kept having a problem with symbols similar to this issue here)
If at all helpful, I made a newer version of a docker image that is up to date (as of Nov 21st, 2022 at least), and fixes the incompatabilities with myBinder - a way for others to try out jupyterlab with iJavaScript without having to install the whole lab.
Can find the docker hub instance here: https://hub.docker.com/r/darkbluestudios/jupyter-ijavascript-utils
Or you can use my-binder and give it a whirl here:
More details on #273
hi
as compared to the patchy Dockerfile that I had to use a while when this discussion was started, I recently had a chance to check that the hack is no longer needed, and I could build a working image like so:
minimal-notebook
as exposed by the jupyter docker-stacks thingyRUN true \
&& apt-get update --yes \
&& apt-get install --yes nodejs npm \
&& npm install -g --unsafe-perm ijavascript \
&& ijsinstall --install=global \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# somehow node won't find stuff installed by npm, this band-aid will help
ENV NODE_PATH="/opt/conda/lib/node_modules/"
I have not had a chance to check whether the latest setting of NODE_PATH
is still needed, but I can tell this recipe works for me at this point
Just want to add the following Dockerfile code using the official Jupyter minimal image. This should work with their other builds by just replacing the top line. It took me a long time to realize that installing node 20 through apt-get has no effect as the conda links to the conda version of node instead of the system-wide node installed by apt-get. Posting it here to save others some time and it currently works:
# Start from the Jupyter minimal-notebook image on Quay.io
FROM quay.io/jupyter/minimal-notebook:latest
USER root
# Install essential build tools
RUN apt-get update && apt-get install -y build-essential
# Update Conda and install Node.js 20.x
RUN conda update -n base conda -y && \
conda install -c conda-forge nodejs=20.* -y && \
npm install -g npm@latest
# Install IJavaScript
RUN npm install -g ijavascript
RUN ijsinstall --install=global
# Clean up
RUN conda clean --all -f -y && \
npm cache clean --force && \
rm -rf /var/lib/apt/lists/*
# Create necessary directories and set permissions
RUN mkdir -p /home/jovyan/.local/share/jupyter/runtime && \
chown -R jovyan:users /home/jovyan/.local && \
chmod -R 755 /home/jovyan/.local
# Switch back to jovyan user
USER jovyan
# Command to run Jupyter Notebook
CMD ["start-notebook.sh", "--NotebookApp.ip='0.0.0.0'", "--NotebookApp.allow_origin='*'", "--NotebookApp.trust_xheaders=True"]
I personally use the jupyter-pytorch cuda enabled notebook with these additions and it works great. You can find a link to the official Jupyter image descriptions here: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html
I found I had to use the redhat docker server quay to get these to work and I'm not sure they are using the official docker server anymore.
Note: currently ijavascript is not compatible with node 22, which is why the extra lines above were necessary.
I found I had to use the redhat docker server quay to get these to work and I'm not sure they are using the official docker server anymore.
just to confirm that it is my impression as well that the latest jupyter-docker-stacks images are now only published on quay.io and no longer on dockerhub
Can you provide a dockerized image of this, published on docker hub?
Similar to : https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html
Just want something more user friendly where I can just launch with
docker-compose up -d
with a docker-compose.yml like this:version: "3" services: