Hi all
I'm about to setup a docker image that runs jupyterlab. I've found docker-stacks which made it super easy. My Dockerfile looks like this: FROM jupyter/datascience-notebook USER jovyan RUN jupyter labextension install @jupyterlab/google-drive So everything is fine. The only missing thing is to have the host matlab kernel available in jupyter lab on this docker container. Due to license issues the matlab engine must run on the host system. On my host system I've installed matlab engine for python and py-mat-bridge from callisto so when I start jupyterlab or notebook on my host it finds the matlabkernel. How can I route the matlabkernel to the jupyter lab on my docker container so that it appears additional to the python,R and Julia kernel on the docker container? This might be also useful for other connecting
to other than matlab kernels on the host thanks in advance, Karsten
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/5aba776b-dc1c-462d-b08a-bc1a8513257d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
FROM jupyter/datascience-notebook
USER root
RUN apt-get -y update
RUN apt-get -y install openssh-client
USER jovyan
RUN jupyter labextension install @jupyterlab/google-drive
RUN pip install remote_ikernel
On Host:
docker run -it --rm \
-p 8888:8888 \
--add-host="host-machine:$(ipconfig getifaddr en0)" \
-v $(pwd):/home/jovyan/work \
image-name \
start.sh /bin/bash
establish password less ssh tunnelling to host:
jovyan@46dcdfa9fd9b:
ssh-keygen -t rsa
<ret -> no password>
cat .ssh/id_rsa.pub | ssh xxxx@host-machine 'cat >> .ssh/authorized_keys'
<password>
on hostmachine obtain info about the kernel with jupyter kernelspec list --json and put it to:
jovyan@46dcdfa9fd9b:~$ remote_ikernel manage --add --kernel_cmd="xxxxxxxxxxxxxxx/matlab-jupyter/bin/python -m matlab_kernel -f {connection_file}" --name="matlab-on-host" --interface=ssh --host=xxxxx@host-machine --workdir='xxxxxxxxxxxxx-environment' --language=matlab
jovyan@46dcdfa9fd9b:~$ jupyter lab --ip='*' --port=8888 --no-browser
copy the url from the output to your host browser matlab kernel appears in jupiter lab - tested OK :-)
ToDo:
ssh and remote_ikernel manage stuff can't be done in the Dockerfile because the Host IP is known at build time. I must find a way to automatise this.
A jupiter lab extension would be great that scans remote hosts for kernels. Then connect to kernels on demand. @ MinRK: Is something like this planned or ongoing?
Cheers,
Karsten