The Galaxy Docker Project our hands-on tutorial
Preparation docker pull quay.io/bgruening/galaxy:gcc2016 docker pull quay.io/bgruening/galaxy-docs-slurm:gcc2016 git clone -b gcc2016 https://github.com/bgruening/dockergalaxy-stable.git
Outline Docker basics Galaxy Docker image (usage) Galaxy Docker (internals) Galaxy flavours Here you will learn the internals of the Docker Galaxy Image. We will show you tips and tricks on how to run the Galaxy Docker Image successfully in production, how to manage updates and how to bind the container to a cluster scheduler. Moreover, you will learn how to create your own Galaxy flavour mixing a variety of different tools and visualisations.
Container vs. VM
Docker basics
Container lifecycle containers vs. image data persistence mounting volumes
pull docker pull hello-world docker pull docker/whalesay docker pull bgruening/galaxy-stable:16.01 docker pull quay.io/bgruening/galaxy docker images
bag@bag:~$ docker run hello-world run docker run hello-world Hello from Docker. This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker Hub account: https://hub.docker.com For more examples and ideas, visit: https://docs.docker.com/engine/userguide/
run docker run docker/whalesay cowsay Galaxy % docker run docker/whalesay cowsay Galaxy < Galaxy > -------- \ \ \ ##. ## ## ## == ## ## ## ## === /"""""""""""""""" / === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \ o / \ \ / \ \ /
run % docker run --help Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] Run a command in a new container -a, --attach=[] --add-host=[] --cpu-shares... -d, --detach -e, --env=[] --entrypoint --env-file=[]... -h, --hostname -i, --interactive --name --net=default... -P, --publish-all -p, --publish=[] --privileged --rm -t, --tty -v, --volume=[]... Attach to STDIN, STDOUT or STDERR Add a custom host-to-ip mapping (host:ip) CPU shares (relative weight) Run container in background and print container ID Set environment variables Overwrite the default ENTRYPOINT of the image Read in a file of environment variables Container host name Keep STDIN open even if not attached Assign a name to the container Connect a container to a network Publish all exposed ports to random ports Publish a container's port(s) to the host Give extended privileges to this container Automatically remove the container when it exits Allocate a pseudo-tty Bind mount a volume
Control during startup % docker run -i -t -p 8080:80 -p 8021:21 -p 9002:9002 -v /home/user/galaxy_storage/:/export/ --privileged=true -e "NONUSE=reports" -e "GALAXY_CONFIG_ADMIN_USERS=albert@einstein.gov" -e "GALAXY_CONFIG_MASTER_API_KEY=83D4jaba7330aDKHkakjGa937" -e "GALAXY_CONFIG_BRAND='My own Galaxy flavour'" -e "GALAXY_LOGGING=full" quay.io/bgruening/galaxy
exec Run a command in a running container % docker exec <container name> supervisorctl restart galaxy:
stop Stop a running container. Sending SIGTERM and then SIGKILL after a grace period % docker stop <container name>
build Build an image from a Dockerfile % docker build -t image_name <Dockerfile>
ps List containers % docker ps
Galaxy Docker Container https://github.com/bgruening/docker-galaxy-stable FTP-Server Webserver Scheduler Process control UI ToolShed ready Interactive Environment ready docker run -i -t -p 8080:80 quay.io/bgruening/galaxy:gcc2016 doi: 10.5281/zenodo.51627
Things to try adding Data integrated FTP server becoming an Admin restart Galaxy using export mounts (persistent data) trouble shooting (logging) installing tools install visualizations (biojs)...
Galaxy + SLURM = https://github.com/bgruening/docker-galaxy-stable/tree/dev/docs Running_jobs_outside_of_the_container.md
Docker flavours
Galactic Flavours NCBI-Blast ChemicalToolBox ballaxy NGS-deepTools Galaxy ChIP-exo Galaxy Proteomics Imaging Constructive Solid Geometry Galaxy for metagenomics Galaxy with the Language Application Grid tools RNAcommender OpenMoleculeGenerator
Create your own Flavour # Galaxy - My own flavour # # VERSION 0.1 FROM quay.io/bgruening/galaxy:gcc2016 MAINTAINER Björn A. Grüning, bjoern.gruening@gmail.com ENV GALAXY_CONFIG_BRAND deeptools # Install Visualisation # RUN install-biojs msa # Adding the tool definitions to the container ADD my_tool_list.yml $GALAXY_ROOT/my_tool_list.yml # Install deeptools RUN install-tools $GALAXY_ROOT/my_tool_list.yml
The tools file api_key: admin galaxy_instance: http://localhost:8080 tools: - name: fastqc owner: devteam tool_panel_section_id: cshl_library_information tool_shed_url: https://toolshed.g2.bx.psu.edu #revisions:
Galaxy Flavor Generator https://github.com/galaxyflavorsgenerators/galaxyflavorgenerator