Docker Installation - giffordlabcvr/Hepadnaviridae-GLUE GitHub Wiki
How Docker-Based GLUE Works
GLUE is packaged into two Docker images:
-
cvrbioinformatics/gluetools-mysql
: This image provides the MySQL database that GLUE uses along with scripts for managing it. A container based on this image runs in the background as a daemon, providing persistent database storage. -
cvrbioinformatics/gluetools
: This image contains the GLUE engine software and third-party dependencies like RAxML and MAFFT. Containers based on this image are used for interactive GLUE sessions.
Steps to Install Docker-Based Hepadnavirus-GLUE
1. Install Docker
Make sure you have Docker installed on your machine. Instructions for installing Docker can be found here.
gluetools-mysql
Container
2. Set Up the Pull the gluetools-mysql image:
docker pull cvrbioinformatics/gluetools-mysql:latest
Create and start the gluetools-mysql
container:
docker run --detach --name gluetools-mysql cvrbioinformatics/gluetools-mysql:latest
[!NOTE] The container was started in detached mode, and will run in the background as a daemon. This will provide GLUE with its persistent database storage inbetween GLUE sessions.
3. Install the Hepadnaviridae-GLUE Project
Install the pre-built Hepadnaviridae-GLUE dataset into the gluetools-mysql
container:
docker exec gluetools-mysql installGlueProject.sh hepadnavirus_glue
4. Start a GLUE Shell Session
Pull the gluetools
image:
docker pull cvrbioinformatics/gluetools:latest
Start a gluetools
container and link it to the gluetools-mysql
container:
docker run --rm -it --name gluetools --link gluetools-mysql cvrbioinformatics/gluetools:latest
You will enter an interactive GLUE shell session:
GLUE Version 1.1.113
Copyright (C) 2018 The University of Glasgow
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. For details see
GNU Affero General Public License v3: http://www.gnu.org/licenses/
Mode path: /
Option load-save-path: /opt/gluetools/projects/exampleProject
GLUE>
Hints & Tips
Adjusting Console Log Level
By default, the Docker-based GLUE console operates at the highest verbosity level (FINEST
), which provides detailed output for debugging purposes. To adjust the console output to a more typical level, such as INFO
, use the following command:
GLUE> console set log-level INFO
OK
This change reduces the amount of information displayed, making the console output more concise and easier to follow during regular usage.
Using a Custom Working Directory
The working directory for the gluetools
container defaults to the example project directory. However, this can be overridden by adding the following option to the docker run
command:
--workdir /opt/gluetools/projects/my_glue_project
For example, to create a working directory for a hepadnavirus project:
docker run --rm -it --name gluetools --volume /path/to/file/:/opt/hepadnavirus --workdir /opt/hepadnavirus --link gluetools-mysql cvrbioinformatics/gluetools:latest
When using this setup, the GLUE shell will use the specified working directory:
GLUE Version 1.1.113
Copyright (C) 2015-2020 The University of Glasgow
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. For details see
GNU Affero General Public License v3: http://www.gnu.org/licenses/
Mode path: /
Option load-save-path: /opt/hepadnavirus
Using Host File System for Preferences and History
To use .gluerc
and .glue_history
files from the host file system rather than the container file system, map your home directory using the --volume
option in the docker run
command:
--volume /home/fred:/home/fred
This setup ensures that your GLUE console preferences and command history persist across sessions.
What Happens When You Shut Down Your Computer?
If your computer is shut down or restarted, the container will stop but the data stored in the container will remain intact. To restart the container after rebooting your computer, run the following command:
docker start gluetools-mysql
This command restarts the container, making the database available again for use with GLUE. Note that this persistence only applies to the container itself, and not to the Docker image. If you remove the container with docker rm, all data stored within it will be lost.