BTW.: get the host ip into the docker container is easy: 1.) add: --add-host="host-machine:$(ipconfig getifaddr en0)" to the docker run command 2.) at the container e.g. in a jupiter lab terminal > ssh user@host-machine ...
On Wednesday, September 6, 2017 at 3:16:05 PM UTC+2, Karsten Wiesner wrote: > > Hi Min > > thanks for the post. I think mounting the matlab installation would not > work because the host is a mac and jupiter docker-stacks is based on > linux.. Anyway we are searching for a solution where the host platform can > be any OS. Your 2nd idea is what I've been thinking about too. But yes that > is tricky. 1st: How to get the IP Address of the host from within the > docker container (running in bridge mode). 2nd.: setting up a remote > connection to the kernel. I have found projects that are dealing with this: > jupiter_kernel_gateway, rk from korniichuk and I have also tried to > manually route ports to the container with docker run -p ... I'm a bit lost > though. Isn't there a standard way to or best practise to let jupiter > lab/notebook/ipython route to remote kernels? > > Cheers, > Karsten > > > On Wednesday, September 6, 2017 at 2:34:46 PM UTC+2, Min RK wrote: >> >> That's a very interesting problem! One way that *might* work is to mount >> the matlab installation as a volume in the container. That would assume >> that the docker image is sufficiently compatible with the host system. >> >> To work on this, I would skip JupyterHub and try to get it running with a >> single notebook container: >> >> docker run -v /path/to/matlab:/path/to/matlab -it my-image-name >> >> If you get it working that way, you can add the volume in your >> `c.DockerSpawner.volumes` config. >> >> Otherwise you are going to have to provide a way for containers to launch >> processes outside themselves on the host. This is a bit antithetical to >> containers, so may require a bit of work. You might need to run a service >> on the host that allows requesting kernels via HTTP, which you can then >> hook up in your container. >> >> -Min >> >> On Wed, Sep 6, 2017 at 2:17 PM, Karsten Wiesner <[email protected]> >> wrote: >> >>> 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 [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jupyter/5aba776b-dc1c-462d-b08a-bc1a8513257d%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/jupyter/5aba776b-dc1c-462d-b08a-bc1a8513257d%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/4bf8619f-4270-4e7d-96ba-1ddfa677e2eb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
