diff --git a/Dockerfile b/Dockerfile index 28ebafb..3b605de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,35 +105,52 @@ FROM system COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -# Install STKO +# Install Paraview RUN apt update \ && apt upgrade -y \ && apt install build-essential -y -RUN apt update \ - && apt install -y \ - python3-dev \ - tcl8.6-dev \ - tk8.6-dev \ - libtogl-dev \ - libglu1-mesa-dev \ - freeglut3-dev \ - mesa-common-dev \ - mesa-utils \ - libxi-dev \ - libxmu-dev \ - xterm +#old dependencies for STKO: +#RUN apt update \ +# && apt install -y \ +# python3-dev \ +# tcl8.6-dev \ +# tk8.6-dev \ +# libtogl-dev \ +# libglu1-mesa-dev \ +# freeglut3-dev \ +# mesa-common-dev \ +# mesa-utils \ +# libxi-dev \ +# libxmu-dev \ +# xterm + +RUN apt-get update && apt-get install -y wget bzip2 nodejs nodejs-legacy curl gnupg gnupg2 gnupg1 && \ + wget -q http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh && \ + bash Miniconda2-latest-Linux-x86_64.sh -p /miniconda -b && \ + rm Miniconda2-latest-Linux-x86_64.sh && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get purge -y wget && \ + conda install paraview -c bioconda -c conda-forge -y +RUN curl -sL https://deb.nodesource.com/setup_7.x | bash +RUN apt-get install -y nodejs protobuf-compiler +RUN npm install -g pvw-visualizer +RUN echo $CONDA/lib/paraview-5.2/ > /etc/ld.so.conf.d/paraview.conf && \ + ldconfig && \ + mkdir /usr/local/opt/ && \ + mkdir /Applications +RUN ldconfig /usr/local/lib /miniconda/lib/paraview-5.2 RUN apt update \ && apt install -y \ libxkbcommon-x11-0 -# Add stko executable -ADD STKO-Install /STKO-Install +# Add paraview executable +ADD Paraview-Install /Paraview-Install # Use/overwrite script so that it uses qt libs that will be installed by online installer -COPY STKO.sh /STKO-Install/STKO.sh +COPY Paraview.sh /Paraview-Install/Paraview.sh # Install qt 5.12.4 using online installer COPY qt_install_utils/ /qt_temp diff --git a/STKO.sh b/Paraview.sh similarity index 100% rename from STKO.sh rename to Paraview.sh diff --git a/README_STKO.md b/README_Paraview.md similarity index 69% rename from README_STKO.md rename to README_Paraview.md index a0267ec..e22f7b8 100644 --- a/README_STKO.md +++ b/README_Paraview.md @@ -1,17 +1,17 @@ -STKO app + app -------- Here are some notes on this app's image. Building Docker image ================ -Get STKO-Install.zip from developers and unzip into this diretory +Get paraview-Install.zip from developers and unzip into this diretory ``` docker build -t tagname . ``` Other files of interest used in image ========================= -STKO.sh is an edited version of STKO-Install/STKO.sh (provided by STKO devs) which uses a system-installed qt version instead of the libs they provided +Paraview is an edited version of Paraview-Install/paraview.sh which uses a system-installed qt version instead of the libs they provided `qt_install_utils/qt-installer.qs` is an input script to online qt installer (see Dockerfile for more details on how its used) `qt_install_utils/extract-qt-installer` can be used to see a list of modules which might be helpful when editing qt-installer.qs (`./extract-qt-installer --list qt-opensource-linux-x64-5.12.4.run`) diff --git a/docker-paraviewweb/.travis.yml b/docker-paraviewweb/.travis.yml new file mode 100644 index 0000000..700065e --- /dev/null +++ b/docker-paraviewweb/.travis.yml @@ -0,0 +1,14 @@ +sudo: required + +language: python +python: 2.7 + +services: + - docker + +before_install: + - docker build -t bmcv/galaxy-paraviewweb . + - docker run -d -p 8777:8777 bmcv/galaxy-paraviewweb + +script: + - docker ps diff --git a/docker-paraviewweb/Dockerfile b/docker-paraviewweb/Dockerfile new file mode 100644 index 0000000..eae0989 --- /dev/null +++ b/docker-paraviewweb/Dockerfile @@ -0,0 +1,40 @@ +FROM nginx + +MAINTAINER Thomas Wollmann + +ENV CONDA /miniconda/ +ENV PATH $CONDA/bin:$PATH + +RUN apt-get update && apt-get install -y wget bzip2 npm nodejs-legacy && \ + wget -q http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh && \ + bash Miniconda2-latest-Linux-x86_64.sh -p /miniconda -b && \ + rm Miniconda2-latest-Linux-x86_64.sh && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get purge -y wget && \ + conda install paraview -c bioconda -c conda-forge -y && \ + npm install -g pvw-visualizer + +RUN echo $CONDA/lib/paraview-5.2/ > /etc/ld.so.conf.d/paraview.conf && \ + ldconfig && \ + mkdir /usr/local/opt/ && \ + mkdir /Applications + +ADD nginx.conf /etc/nginx/nginx.conf + +WORKDIR /input + +ENV DEBUG=false \ + GALAXY_WEB_PORT=10000 \ + NOTEBOOK_PASSWORD=none \ + CORS_ORIGIN=none \ + DOCKER_PORT=none \ + API_KEY=none \ + HISTORY_ID=none \ + REMOTE_HOST=none \ + GALAXY_URL=none + +EXPOSE 8777 + +ADD startup.sh / +RUN chmod +x /startup.sh +CMD /startup.sh diff --git a/docker-paraviewweb/LICENSE b/docker-paraviewweb/LICENSE new file mode 100644 index 0000000..853b46d --- /dev/null +++ b/docker-paraviewweb/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docker-paraviewweb/README.md b/docker-paraviewweb/README.md new file mode 100644 index 0000000..e2bdeeb --- /dev/null +++ b/docker-paraviewweb/README.md @@ -0,0 +1,46 @@ + +[![Build Status](https://travis-ci.org/BMCV/docker-paraviewweb.svg?branch=master)](https://travis-ci.org/BMCV/docker-paraviewweb) +[![Docker Pulls](https://img.shields.io/docker/pulls/bmcv/galaxy-paraviewweb.svg)](https://hub.docker.com/r/bmcv/galaxy-paraviewweb/) +[![Docker Stars](https://img.shields.io/docker/stars/bmcv/galaxy-paraviewweb.svg)](https://hub.docker.com/r/bmcv/galaxy-paraviewweb/) + +Docker ParaViewWeb Container +======================== + + +This [ParaViewWeb](http://paraviewweb.kitware.com/) Docker container is used by the [Galaxy Project](https://galaxyproject.org/). + +![screenshot](screenshot.png) + +Usage +===== + +* Build your own image and run it + + [Docker](https://www.docker.com) is a pre-requirement for this project. You can build the container with: + ```bash + docker build -t paraviewweb . + ``` + The build process can take some time, but if finished you can run your container with: + ```bash + docker run -p 8777:8777 -v /home/user/paraviewweb/input/:/input/ -v /home/user/paraviewweb/output/:/output/ paraviewweb + ``` + and you will have a running [ParaViewWeb](http://paraviewweb.kitware.com/) instance on ``http://localhost:8777/apps/Visualizer``. + + Environment Variables + ===================== + + Some environment variables are made available to the user which will allow for configuring the behaviour of individual instances. + + Variable | Use + ------------------- | --- + `DATASET_HID` | Path of file relative to /input which is loaded on startup + +Acknowledgment +======================== +This work was supported by the BMBF-funded Heidelberg Center for Human Bioinformatics (HD-HuB) within the German Network for Bioinformatics Infrastructure (de.NBI) #031A537C. + +Works best with +===================== + + * [Galaxy Image Analysis Tools](https://github.com/ThomasWollmann/galaxy-image-analysis) + * [Galaxy Imaging](https://github.com/bgruening/docker-galaxy-imaging) diff --git a/a b/docker-paraviewweb/input/moo.txt similarity index 100% rename from a rename to docker-paraviewweb/input/moo.txt diff --git a/docker-paraviewweb/nginx.conf b/docker-paraviewweb/nginx.conf new file mode 100644 index 0000000..894a5be --- /dev/null +++ b/docker-paraviewweb/nginx.conf @@ -0,0 +1,28 @@ +events { + worker_connections 128; +} + +http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 8777; + server_name 0.0.0.0; + + location / { + proxy_pass http://127.0.0.1:9777; + + add_header Access-Control-Allow-Origin *; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With'; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + } + } +} diff --git a/docker-paraviewweb/output/moo.txt b/docker-paraviewweb/output/moo.txt new file mode 100644 index 0000000..e69de29 diff --git a/docker-paraviewweb/screenshot.png b/docker-paraviewweb/screenshot.png new file mode 100644 index 0000000..cfbd815 Binary files /dev/null and b/docker-paraviewweb/screenshot.png differ diff --git a/docker-paraviewweb/startup.sh b/docker-paraviewweb/startup.sh new file mode 100644 index 0000000..f158b2c --- /dev/null +++ b/docker-paraviewweb/startup.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +service nginx start + +if [ -z "$DATASET_HID" ] +then + Visualizer --paraview $CONDA/lib/paraview-5.2/ \ + --data /input \ + --port 8777 \ + --server-only +else + Visualizer --paraview $CONDA/lib/paraview-5.2/ \ + --data /input \ + --port 8777 \ + --server-only \ + --load-file $DATASET_HID +fi