Hi.
I'm trying to run ensembl-vep with Docker from a python code on a Linux server. When the following Docker command runs
docker run -t -i -v $HOME/vep_data:/opt/vep/.vep ensemblorg/ensembl-vep
the command line is changed (it enters the Docker image), and the script pauses, until I exit the image by pressing ctrl+D
. The next command in the script is
vep --cache --offline --format vcf --vcf --force_overwrite \
--input_file input/input.vcf \
--output_file output/output.vcf'''
and now that the script is out of the image the input folder that's specified in the command is not recognized.
Is there a way to use the Docker image without entering the image command line interface?
I used a Docker image before and this scenario did not happen, yet I couldn't find what made the difference between the two commands.
Thanks.
Try removing
-i -t
from your docker run command these will put you in container in interactive mode. You command should look something like this (you should organize your input/output folders):Also consider switching to Apptainer (formerly Singularity) images. You can easily convert an existing Docker image to Apptainer or use e.g. ensembl-vep:108.2--pl5321h4a94de4_0 from the Galaxy Depot. In contrast to Docker, Apptainer doesn't require root permissions, which is imho way safer if you invoke the container by a script.
You can just pull from docker hub with singularity. They added a how to on the manual page: https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#singularity