Skip to content

Instantly share code, notes, and snippets.

@natefoo
Last active December 20, 2016 18:45
Show Gist options
  • Save natefoo/73bdcd9d467efd8d333ec15719e71108 to your computer and use it in GitHub Desktop.
Save natefoo/73bdcd9d467efd8d333ec15719e71108 to your computer and use it in GitHub Desktop.
Galaxy Admin Training Jupyter GIE Setup

As galaxyguest:

sudo apt-get install docker.io npm nodejs-legacy
sudo usermod -a -G docker galaxy
sudo -Hsu galaxy

As galaxy:

docker pull quay.io/bgruening/docker-jupyter-notebook:16.01.1   # not explicitly necessary, GIE will do this
cd /srv/galaxy/server/lib/galaxy/web/proxy/js
npm install
cd /srv/galaxy/server/config/plugins/interactive_environments/jupyter/config
cp jupyter.ini.sample jupyter.ini
cp allowed_images.yml.sample allowed_images.yml
vim allowed_images.yml
cd /srv/galaxy/server/
vim galaxy.ini
exit

As galaxyguest:

sudo vi /etc/nginx/sites-available/galaxy
sudo vi /etc/supervisor/conf.d/galaxy.conf
sudo systemctl restart nginx
sudo supervisorctl update
sudo supervisorctl restart gx:galaxy

Log in to Galaxy and click the viz link on a dataset...

# This file lists acceptable images to allow runing.
#
# This allows you, the admin, to create multiple flavours
# for your users to run. E.g. maybe you need a geosciences flavour,
# you can create the image based on our default image and add the
# appropriate `apt-get/pip install` statements.
---
-
image: quay.io/bgruening/docker-jupyter-notebook:16.01.1
description: |
The Jupyter notebook is the next iteration of IPython, allowing
analysis in many different languages. This image features the Python,
R, Julia, Haskell, Bash kernels and many scientific analysis stacks for
each.
interactive_environment_plugins_directory = /srv/galaxy/server/config/plugins/interactive_environments
dynamic_proxy_external_proxy = True
dynamic_proxy_manage = False
dynamic_proxy_bind_port = 8800
dynamic_proxy_debug = True
dynamic_proxy_session_map = /srv/galaxy/server/gie_proxy_session_map.sqlite
dynamic_proxy_prefix = gie_proxy
dynamic_proxy_bind_ip = 127.0.0.1
# THIS FIRST LOCATION SHOULD ALREADY BE IN YOUR CONFIG BUT GIEs WILL NOT WORK IF IT IS NOT
# serve vis/IE plugin static content
location ~ ^/plugins/(?<plug_type>.+?)/(?<vis_name>.+?)/static/(?<static_file>.*?)$ {
alias /srv/galaxy/server/config/plugins/$plug_type/$vis_name/static/$static_file;
}
# Global GIE configuration
location /gie_proxy {
proxy_pass http://localhost:8800/gie_proxy;
proxy_redirect off;
}
# Project Jupyter / IPython specific. Other IEs may require their own routes.
location ~ ^/gie_proxy/jupyter/(?<nbtype>[^/]+)/api/kernels(?<rest>.*?)$ {
proxy_pass http://localhost:8800/gie_proxy/jupyter/$nbtype/api/kernels$rest;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
[program:gie_proxy]
command = node /srv/galaxy/server/lib/galaxy/web/proxy/js/lib/main.js --ip 127.0.0.1 --port 8800 --sessions /srv/galaxy/server/gie_proxy_session_map.sqlite --cookie galaxysession --verbose
directory = /srv/galaxy/server/lib/galaxy/web/proxy
umask = 022
autostart = true
autorestart = true
startsecs = 5
user = galaxy
numprocs = 1
stdout_logfile = /srv/galaxy/server/gie_proxy.log
redirect_stderr = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment