Coder Social home page Coder Social logo

bgruening / docker-jupyter-notebook Goto Github PK

View Code? Open in Web Editor NEW
33.0 6.0 39.0 273 KB

:whale: :microscope: :books: Jupyter running in a docker container. This image can be used to integrate Jupyter into Galaxy

License: MIT License

CSS 0.24% JavaScript 3.22% Python 89.48% Shell 2.00% Jupyter Notebook 1.92% Dockerfile 3.14%

docker-jupyter-notebook's People

Contributors

anuprulez avatar bgruening avatar blankenberg avatar hexylena avatar jmchilton avatar marie59 avatar natefoo avatar thomaswollmann avatar torhou avatar tunck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-jupyter-notebook's Issues

iHaskell Kernel is not available

What I did:

docker pull bgruening/docker-jupyter-notebook

docker run --rm -it -p 8889:8888 bgruening/docker-jupyter-notebook

Result (see image):
No iHaskell Kernel available

image

R kernel is not working

Hi,

I have integrate Jupyter into my Galaxy instance. Python 2 and 3 kernels, Julia and Bash kernels are working but R kernel is not working. What could be the reason?

Regards,
Marija

Docker not building

cabal: Error: some packages failed to install:
ihaskell-0.8.0.0 depends on zeromq4-haskell-0.6.3 which failed to install.
ipython-kernel-0.8.4.0 depends on zeromq4-haskell-0.6.3 which failed to
install.
zeromq4-haskell-0.6.3 failed during the configure step. The exception was:
ExitFailure 1

I can't manage to build master with "docker build -t galaxy-jupyter-notebook . ". Container also fails on quay.io.

Jupyter image 17.05.1 (quay.io) cannot save notebooks to Galaxy history

Hi Bjorn,
This is an issue I have been facing lately with Jupyter notebooks in Galaxy. In the past, our Galaxy instance (at Rothamsted) was using the jupyter: 16.01 image in which the Python 2, 3 and R kernels all worked okay and we were able to checkpoint/save notebooks, access Galaxy datasets and also export plots/images to history.

However, we needed to use the DESeq2 R package which wasn't available in the 16.01 image. I tried installing it in the R kernel from Bioconductor via:
source("https://bioconductor.org/biocLite.R") biocLite("DESeq2")

But got a "URLs not supported" error. I contacted you in March 2017 about this and you suggested using the latest juypter docker image instead of 16.01.

We are now using that latest image (as of May) but:

  1. saving/ checkpoint notebook doesn't work
  2. trying to install DESeq2 throws a bunch of errors, similar to https://support.bioconductor.org/p/54381/ :
    Warning message in install.packages(pkgs = doing, lib = lib, ...): “installation of package ‘XML’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, ...): “installation of package ‘annotate’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, ...): “installation of package ‘genefilter’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, ...): “installation of package ‘geneplotter’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, ...): “installation of package ‘DESeq2’ had non-zero exit status”Updating HTML index of packages in '.Library'

Reading data from history

Hi,

I integrated jupyter into my local Galaxy instance. The problem is I cannot fetch the data from my history. I am getting next error:

DEBUG:root:Host IP determined to be 172.17.0.1

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): 172.17.0.1
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-1-f806ba0d650b> in <module>()
----> 1 handle = open(get(2), 'r')

/home/jovyan/py/galaxy.py in get(dataset_id, history_id)
    115     history_id = history_id or os.environ['HISTORY_ID']
    116 
--> 117     gi = get_galaxy_connection(history_id=history_id)
    118 
    119     file_path = '/import/%s' % dataset_id

/home/jovyan/py/galaxy.py in get_galaxy_connection(history_id)
     92     ### Fail ###
     93     msg = "Could not connect to a galaxy instance on %s. Please contact your SysAdmin for help with this error" % url
---> 94     raise Exception(msg)
     95 
     96 

Exception: Could not connect to a galaxy instance on http://172.17.0.1:None. Please contact your SysAdmin for help with this error

Any recommendation how to solve it is more than welcome?

Thanks in advance.
Best,
Marija

Docker container fails to start

Hi,

I tried to get the bgruening/docker-jupyter-notebook running by using the command you provided in the readme

docker run -p 7777:8888 bgruening/docker-jupyter-notebook

This causes an exception:

[TrustNotebookApp] Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret
Signing notebook: /import/ipython_galaxy_notebook.ipynb
[E 07:40:41.105 NotebookApp] Exception while loading config file /home/jovyan/.jupyter/jupyter_notebook_config.py
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.4/site-packages/traitlets/config/application.py", line 535, in _load_config_files
        config = loader.load_config()
      File "/opt/conda/lib/python3.4/site-packages/traitlets/config/loader.py", line 432, in load_config
        self._read_file_as_dict()
      File "/opt/conda/lib/python3.4/site-packages/traitlets/config/loader.py", line 464, in _read_file_as_dict
        py3compat.execfile(conf_filename, namespace)
      File "/opt/conda/lib/python3.4/site-packages/ipython_genutils/py3compat.py", line 185, in execfile
        exec(compiler(f.read(), fname, 'exec'), glob, loc)
      File "/home/jovyan/.jupyter/jupyter_notebook_config.py", line 20, in <module>
        """ % {'CORS_ORIGIN': os.environ['CORS_ORIGIN'], 'WS_CORS_ORIGIN': 'ws://%s' % os.environ['CORS_ORIGIN'].split('://')[1]}
    IndexError: list index out of range
[I 07:40:41.113 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[W 07:40:41.144 NotebookApp] ipywidgets package not installed.  Widgets are unavailable.
[I 07:40:41.173 NotebookApp] Serving notebooks from local directory: /import
[I 07:40:41.174 NotebookApp] 0 active kernels 
[I 07:40:41.174 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 07:40:41.174 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

which seems to come from the /home/jovyan/.jupyter/jupyter_notebook_config.py in line 20 where it runs

""" % {'CORS_ORIGIN': os.environ['CORS_ORIGIN'], 'WS_CORS_ORIGIN': 'ws://%s' % os.environ['CORS_ORIGIN'].split('://')[1]}

I would assume the split function but my python experience is just sparse.

The docker container is running after this exception but there is no service available on port 8888.

Maybe you have a quick fix for this problem.

Thanks in advance.

Best regards,
Christoph, @sneumann, @korseby

The green button always saves the notebook "ipython_galaxy_notebook.ipynb" into my history

After clicking the "New Notebook" option and select "Python 3", I get a new notebook. I rename it to "another_book". And then I click the green button that is supposed to save the current notebook (e.g. "another_book") into my history. But instead of doing that, it actually saves the other notebook called "ipython_galaxy_notebook.ipynb" into my history.
Is this caused by a bug in the container?
Thank you very much!

Collection manipullation

It would be nice to read and write collections or composite datatypes within the Jupyter notebook. Is this already possible? If not add it to my wishlist.

Not able to retrieve kernelspecs

Move this out of our chat @bgruening as I dug a bit deeper but feeling stuck.
The overall issue is that this image gets loaded as a Galaxy IE and Jupyter starts but it does not load any kernels. This seems to be caused by not being able to retrieve kernelspecs (e.g., <galaxy_host>/galaxy/gie_proxy/jupyter/ipython/api/kernelspecs).
Connecting to a running container, the kernels are available:

$ jupyter kernelspec list
Available kernels:
  ruby         /home/jovyan/.ipython/kernels/ruby
  bash         /home/jovyan/.local/share/jupyter/kernels/bash
  ir           /opt/conda/share/jupyter/kernels/ir
  julia-0.5    /opt/conda/share/jupyter/kernels/julia-0.5
  python3      /opt/conda/share/jupyter/kernels/python3
  python2      /usr/local/share/jupyter/kernels/python2

The container log just records 404 on the above URL but nothing more: https://gist.github.com/afgane/7297b8964abd2c88136282b282a0b842

All of this is from Ubuntu 16.04, Galaxy 17.09 now, and Docker 17.05.0-ce using 17.09 version of the IE image. I've been seeing the same behavior on Ubuntu 14.04 and Galaxy 17.05 over the past day.

On the other hand, usegalaxy.org returns a json with the specs (after loading an IE visit https://usegalaxy.org/gie_proxy/jupyter/ipython/api/kernelspecs).

Not sure where else to look so if you have any pointers or would like access to this instance, let me know.

Error 404 with :latest and 2021-03-05

Hi I'm trying to activate the interactive-environment on a 20.05 galaxy instances.
The galaxy instance was deployed using Ansible, following the guidelines at https://training.galaxyproject.org/training-material/topics/admin/tutorials/ansible-galaxy/tutorial.html on a CentOS 7 virtual machine.
In order to activate the environment I followed the guidelines in the galaxy documentation.

I have some problem with the new images :latest and :2021-03-05.

When i run the container using a tabular file as input I receive 404 error:

docker-jup-error404

Docker log

[TrustNotebookApp] ERROR | Notebook missing: /import/ipython_galaxy_notebook.ipynb
[I 14:41:39.906 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[W 14:41:40.269 NotebookApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
[W 2021-04-30 14:41:41.436 LabApp] 'allow_origin' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.439 LabApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.439 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.439 LabApp] 'allow_credentials' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.439 LabApp] 'allow_origin' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.439 LabApp] 'allow_root' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.439 LabApp] 'base_url' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.440 LabApp] 'token' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.440 LabApp] 'tornado_settings' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-04-30 14:41:41.440 LabApp] 'tornado_settings' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2021-04-30 14:41:41.455 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.8/site-packages/jupyterlab
[I 2021-04-30 14:41:41.455 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 14:41:41.865 NotebookApp] [Jupytext Server Extension] Deriving a JupytextContentsManager from LargeFileManager
[I 14:41:41.869 NotebookApp] Serving notebooks from local directory: /import
[I 14:41:41.869 NotebookApp] Jupyter Notebook 6.2.0 is running at:
[I 14:41:41.869 NotebookApp] http://36c4117dfe7e:8888/gie_proxy/jupyter/ipython/
[I 14:41:41.869 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 14:41:41.880 NotebookApp] 302 GET /gie_proxy/jupyter/ipython/login?next=%2Fgie_proxy%2Fjupyter%2Fipython%2Ftree (172.17.0.1) 2.090000ms
[W 14:41:42.192 NotebookApp] 404 GET /gie_proxy/jupyter/ipython/notebooks/ipython_galaxy_notebook.ipynb (172.17.0.1): No such file or directory: ipython_galaxy_notebook.ipynb
[W 14:41:42.218 NotebookApp] 404 GET /gie_proxy/jupyter/ipython/notebooks/ipython_galaxy_notebook.ipynb (172.17.0.1) 27.870000ms referer=http://212.189.205.57/plugins/interactive_environments/jupyter/show?image_tag=quay.io%2Fbgruening%2Fdocker-jupyter-notebook%3Alatest&dataset_id=f2db41e1fa331b3e&additional_dataset_ids=

This doesn't happen if I use a previously created (using image 17.09) ipython_galaxy_notebook.ipynb as input file.

running-jup

So I modified the startup.sh docker script, uncommenting the if loop, and i created a new docker image

modified startup.sh:

#!/bin/bash

# The IPython image starts as privileged user.
# The parent Galaxy server is mounting data into /import with the same
# permissions as the Galaxy server is running on.
# In case of 1450 as UID and GID we are fine, because our preconfigured ipython
# user owns this UID/GID.
# (1450 is the user id the Galaxy-Docker Image is using)
# If /import is not owned by 1450 we need to create a new user with the same
# UID/GID as /import and make everything accessible to this new user.
#
# In the end the IPython Server is started as non-privileged user. Either
# with the UID 1450 (preconfigured jupyter user) or a newly created 'galaxy' user
# with the same UID/GID as /import.

export PATH=/home/jovyan/.local/bin:$PATH

python /get_notebook.py

if [ ! -f /import/ipython_galaxy_notebook.ipynb ]; then
    cp /home/$NB_USER/notebook.ipynb /import/ipython_galaxy_notebook.ipynb
    chown $NB_USER /import/ipython_galaxy_notebook.ipynb
fi

jupyter trust /import/ipython_galaxy_notebook.ipynb
##/monitor_traffic.sh &
jupyter notebook --no-browser

With this modification the: latest and :2021-03-05 images works also using a tabular file as input.
So my question is, could this be the problem, or should I investigate further, maybe in the configuration of the Galaxy instance?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.