- node 0.10.X - 0.11.X (v0.10.48 tested)
- nvm (v0.33.8)
- Docker
Note : Be careful of the node version. Node has recently upgraded, and the galaxy proxy is pinned to an old version of sqlite3. As such you’ll currently need to have an older version of Node available (0.10.X - 0.11.X vintage). Please note that if you have NodeJS installed under Ubuntu, it often installs to /usr/bin/nodejs, whereas npm expects it to be /usr/bin/node. You will need to create that symlink yourself. cf "Install the requirements".
sudo apt-get install docker.io
sudo apt-get install npm
To install or update nvm, you can use the install script using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
So, you need to source
your profile : source ~/.bashrc
You can check if nvm is correctly installed and if you have the good nvm version (v0.33.8) with : nvm --version
Then, install node v0.10.48 (version tested):
nvm install v0.10.48
Please note that npm
expects node
to be in /usr/bin/node, so you should create a symlink from node v0.10.48 to /usr/bin/node.
ln -s $HOME_PATH/.nvm/v0.10.48/bin/node /usr/bin/node
Finally you should have node v0.10.48 with the command node --version
Install the Shiny Galaxy Interactive Environment (GIE) (From the "How to install a Shiny environment" of CARPEM)
git clone https://github.com/RomainDallet/gie-shiny-installation.git
cp -r shiny $GALAXY_PATH/config/plugins/interactive_environments/
4. In the shiny/config/shiny.xml, you can define for which input your Shiny environment will be available.
5. In the templates folder, you can define how the data are mounted inside your Shiny app in the shiny.mako.
Configure Node.js proxy (From the "Exercise - Running the Jupyter Galaxy Interactive Environment (GIE)" of dagobah-training)
First, check your node version by running the command :
node --version
If you have not the node
command or your version is not between the 0.10.X - 0.11.X, follow the "Install the requirements" part.
Then you need to install the proxy in your Galaxy instance.:
cd $GALAXY_PATH/lib/galaxy/web/proxy/js
npm install
Next, edit $GALAXY_PATH/config/galaxy.ini and change the following options:
interactive_environment_plugins_directory = $GALAXY_PATH/config/plugins/interactive_environments
dynamic_proxy_external_proxy = True
dynamic_proxy_manage = True
dynamic_proxy_bind_port = 8800
dynamic_proxy_debug = True
dynamic_proxy_session_map = $GALAXY_PATH/config/gie_proxy_session_map.sqlite
dynamic_proxy_prefix = gie_proxy
dynamic_proxy_bind_ip = 127.0.0.1
We'll now proxy the Node.js proxy with nginx. This is done by adding to /etc/nginx/sites-available/galaxy. Inside the server {...} block, add:
# Global GIE configuration
location /gie_proxy {
proxy_pass http://127.0.0.1:8800/gie_proxy;
proxy_redirect off;
}
# Shiny
location /gie_proxy/shiny/ {
proxy_pass http://127.0.0.1:8800/;
proxy_redirect off;
}
Once saved, restart nginx to reread the config:
/etc/init.d/nginx restart
orsudo systemctl restart nginx
sh run.sh
If it's work, you may can load a Shiny Interactive Environment from a txt file.
Note : You must have an account and be logged in to access interactive environments. Just create one!