You can use the provided docker images to use vpf-class
without any manual
configuration. This will automatically download the required supplementary data
at each start, so we recommend first creating a volume to persist it:
docker volume create vpf-data
Then to classify sequences from seqs/test.fna
you should run
docker run --rm -it
-v "vpf-data:/opt/vpf-tools/vpf-data" \
-v "$PWD/seqs:/opt/vpf-tools/input-sequences:ro" \
-v "$PWD/outputs:/opt/vpf-tools/outputs:rw" \
bielr/vpf-tools \
vpf-class -i input-sequences/test.fna -o outputs/test-classified
This command:
- Mounts the
vpf-data
volume as/opt/vpf-tools/vpf-data
. - Binds
./seqs
to/opt/vpf-tools/input-sequences
, read-only. - Binds
./outputs/
to/opt/vpf-tools/outputs
. - Automatically downloads all the required data into the
vpf-data
Docker volume (mounted as/opt/vpf-tools/vpf-data
) and setsVPF_CLASS_DATA_INDEX
to/opt/vpf-tools/vpf-data/index.yaml
. - Runs
vpf-class
, writing the output into theoutputs/
directory.
A free additional benefit of using it in a container is the ability to limit resources, like memory usage, disk access and both CPU shares and number of cores.
There are two settings that can be adjusted via environment variables (using
docker's -e
flag before bielr/vpf-tools
).
VPF_TOOLS_CHMOD
(default1
): Due to how permissions work in Docker, we set the container's umask to000
andchmod 777
supplementary data to be readable and writable by all users (the container runs as root). If you are using your own image with the correct UID and/or running Docker in rootless mode, you can turn off this behaviour usingVPF_TOOLS_CHMOD=0
.VPF_DATA_AUTOUPDATE
(default1
): At each start, the container will check if the supplementary data is both present and up-to-date. If you already have downloaded the data yourself or simply want to disable this feature, useVPF_DATA_AUTOUPDATE=0
. Note that you may need to use either--data-index
or set the correct value ofVPF_CLASS_DATA_INDEX
if the path toindex.yaml
differs from the default.