cytoscape / jupyter-cytoscape

Cytoscape.js API support in JS, Python, and R Jupyter kernels
MIT License
10 stars 4 forks source link

Create Dockerfile #1

Closed kozo2 closed 7 years ago

paul-shannon commented 7 years ago

@kozo2 Thanks very much for this! Presenting a notebook as a docker container is very sensible. I am pretty new to docker, having only run a few simple tutorial examples previously. Here's the error trace I get when I run docker build .. Any suggestions?

npm ERR! Linux 4.4.39-moby
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "update"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! path /workdir/js/node_modules/@types/jquery
npm ERR! code EXDEV
npm ERR! errno -18
npm ERR! syscall rename

npm ERR! EXDEV: cross-device link not permitted, rename '/workdir/js/node_modules/@types/jquery' -> '/workdir/js/node_modules/@types/.jquery.DELETE'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /workdir/js/npm-debug.log
kozo2 commented 7 years ago

@paul-shannon I have no idea about your npm error but I found a missing Debian package in my Dockerfile (and updated it in https://github.com/cytoscape/jupyter-cytoscape/pull/1/commits/b8c46f6303ab4ec99b2d16b98ed9dd0ed92405d4). Could you try the following commands?

git clone -b patch-1 https://github.com/kozo2/jupyter-cytoscape
docker build -t jupytercy jupyter-cytoscape/
docker run -d -p 8888:8888 jupytercy
a47db3898fbf42350749805551436733f3998044928782363751347e1ddc3b4c

docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
a47db3898fbf        jupytercy           "/usr/bin/tini -- jup"   2 seconds ago       Up 1 seconds        0.0.0.0:8888->8888/tcp   big_montalcini

docker exec -it big_montalcini jupyter notebook list
Currently running servers:
http://0.0.0.0:8888/?token=5243b38a5bf9f711bd489f67bcaa05b420f420f329183bec :: /workdir

Please note that

kozo2 commented 7 years ago

@paul-shannon If you have any trouble running the above commands, please try the following commands instead.

docker pull kozo2/jupyter-cytoscape
docker run -d -p 8888:8888 kozo2/jupyter-cytoscape
docker ps
docker exec -it THE_NAME_OF_YOUR_CONTAINER jupyter notebook list

I created an automated build for https://github.com/kozo2/jupyter-cytoscape . (https://hub.docker.com/r/kozo2/jupyter-cytoscape/)

paul-shannon commented 7 years ago

Thanks, Kozo. We will figure this out - but I am not there yet. Here’s the trace:

docker run -d -p 8888:8888 kozo2/jupyter-cytoscape 304d57938a0e5c4e66ef0da6f8b13a22fb9c7f36a0952303a54f6e9c9656a478

docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 304d57938a0e kozo2/jupyter-cytoscape "/usr/bin/tini -- jup" 15 seconds ago Up 14 seconds 0.0.0.0:8888->8888/tcp clever_goldwasser

hostname # riptide.local

docker exec -it THE_NAME_OF_YOUR_CONTAINER jupyter notebook list

docker exec -it riptide.local jupyter notebook list

Error response from daemon: No such container: riptide.local

On Jan 9, 2017, at 10:20 AM, Kozo Nishida notifications@github.com wrote:

@paul-shannon If you have any trouble running the above commands, please try the following instead.

docker pull kozo2/jupyter-cytoscape docker run -d -p 8888:8888 kozo2/jupyter-cytoscape docker ps docker exec -it THE_NAME_OF_YOUR_CONTAINER jupyter notebook list

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mes5k commented 7 years ago

Paul, docker is looking for the name of the container, not the host, which is "clever_goldwasser" in your case. The command should be: docker exec -it clever_goldwasser jupyter notebook list

paul-shannon commented 7 years ago

That works perfectly. Thanks to you both, Kozo and Mike.

I have very little experience with docker, having run only the simplest of demos. Can you help me get the DockerFile working, so that we can easily build from scratch? Then I will gratefully merge the PR.

On Jan 9, 2017, at 1:35 PM, Mike Smoot notifications@github.com wrote:

Paul, docker is looking for the name of the container, not the host, which is "clever_goldwasser" in your case. The command should be: docker exec -it clever_goldwasser jupyter notebook list

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.