Skip to content

Advanced

Rich Mayne edited this page Dec 20, 2024 · 3 revisions

Docker

Prerequisites

  1. Docker (Download link).
  2. Compatible terminal (bash/zsh/powershell).

Acquiring an image

DockerHub image

Users may pull a pre-made image from DockerHub at this link. This contains version 7 of the Castanet application, all of its dependencies and a Kraken2 database for labelling Human reads.

  1. Pull container with $ docker pull mayne941/castanet

Build from source

Users may build a Docker container from source using the following instructions.

  1. Ensure your system has Docker installed.
  2. Navigate to the Castanet repository.
  3. Build the container with $ docker build --tag 'castanet' .

Executing commands from a container

N.b. the dockerhub image does NOT have a Kraken2 database installed by default! This will cause the dep test to fail and, unless you mount a directory containing one, you will have to specify to not run the Kraken2 prefilter (-DoKrakenPrefilter parameter)

  1. Run the container with $ docker run -d -v /path/to/data:/path/to/mount 'castanet' sleep infinity, changing path/to/data to the volume you wish to mount and path/to/mount to where your mounted directory should live inside the container.
  2. Check the container status and find the container ID with $ docker ps
  3. Exec into container (with bash shell) with $ docker exec -it XXXXXXX bash, where XXXXXXX is your container ID
  4. Confirm that Castanet is functional with the Castanet dependency test $ python3 -m app.castanet_lite_deptest

Clone this wiki locally