docker container: resfinder tests fail due to git issue after conda python env added to dockerfile
Here are all the commands I used to download the docker container:
docker pull genomicepidemiology/resfinder:v3-kubernetes
git clone <https://git@bitbucket.org/genomicepidemiology/pointfinder_db.git>
git clone -b 4.0 <https://git@bitbucket.org/genomicepidemiology/resfinder.git>
git clone <https://git@bitbucket.org/genomicepidemiology/disinfinder_db.git> db_disinfinder
cd resfinder/db_resfinder
python3 INSTALL.py
## for each db
I need to keep python2.7 for most of the things I am running locally, so I created a conda environment within the dockerfile to run python3.6. I added this chunk after the line "ENV DEBIAN_FRONTEND noninteractive"
nano dockerfile
##make python3.6 available via conda in dockerfile
FROM continuumio/miniconda
RUN conda create --name test-env python=3.6 && conda clean -a
RUN conda install -c anaconda git && conda clean -a
ENV PATH /opt/conda/envs/test-env/bin:$PATH
RUN echo "Make sure python version is proper"
RUN python --version
When I run docker run --rm -v $(pwd):/workdir -v $PF_DB:/db_pointfinder -v $RF_DB:/db_resfinder --entrypoint tests/functional_tests.py resfinder
from my resfinder
directory, I get the following error message:
ERROR: Could not find a version that satisfies the requirement git (from versions: none)
ERROR: No matching distribution found for git
Traceback (most recent call last):
File "../run_resfinder.py", line 16, in <module>
from cge.out.util.generator import Generator
File "/workdir/cge/out/util/generator.py", line 9, in <module>
from ..result import Result
File "/workdir/cge/out/result.py", line 6, in <module>
from .parserdict import ParserDict
File "/workdir/cge/out/parserdict.py", line 3, in <module>
from .valueparsers import ValueParsers
File "/workdir/cge/out/valueparsers.py", line 3, in <module>
import dateutil.parser
ModuleNotFoundError: No module named 'dateutil'
EEEE
======================================================================
ERROR: test_on_data_with_just_acquired_resgene_using_blast (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/functional_tests.py", line 74, in test_on_data_with_just_acquired_resgene_using_blast
check=True)
File "/opt/conda/envs/test-env/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 ../run_resfinder.py -h' returned non-zero exit status 1.
======================================================================
ERROR: test_on_data_with_just_acquired_resgene_using_kma (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/functional_tests.py", line 153, in test_on_data_with_just_acquired_resgene_using_kma
check=True)
File "/opt/conda/envs/test-env/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /workdir/run_resfinder.py -ifq data/test_isolate_01_1.fq data/test_isolate_01_2.fq -o running_test/test2 -s 'Escherichia coli' --min_cov 0.6 -t 0.8 --acquired --db_path_res /workdir/db_resfinder --kmaPath /workdir/cge/kma/kma' returned non-zero exit status 1.
======================================================================
ERROR: test_on_data_with_just_point_mut_using_blast (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/functional_tests.py", line 210, in test_on_data_with_just_point_mut_using_blast
check=True)
File "/opt/conda/envs/test-env/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /workdir/run_resfinder.py -ifa data/test_isolate_05.fa -o running_test/test3 -s 'Escherichia coli' --min_cov 0.6 --threshold 0.8 --point --db_path_point /workdir/db_pointfinder --blastPath /workdir/cge/blastn' returned non-zero exit status 1.
======================================================================
ERROR: test_on_data_with_just_point_mut_using_kma (__main__.ResFinderRunTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/functional_tests.py", line 253, in test_on_data_with_just_point_mut_using_kma
check=True)
File "/opt/conda/envs/test-env/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /workdir/run_resfinder.py -ifq data/test_isolate_05_1.fq data/test_isolate_05_2.fq -o running_test/test4 -s 'Escherichia coli' --min_cov 0.6 --threshold 0.8 --point --db_path_point /workdir/db_pointfinder --kmaPath /workdir/cge/kma/kma' returned non-zero exit status 1.
----------------------------------------------------------------------
Ran 4 tests in 5.091s
FAILED (errors=4)
So the error from the first line is that git isn't there. I have git locally, and I tried integrating it into the dockerfile, but neither approach worked.
I tried running the container anyway with docker run --rm -v $(pwd):/workdir -v $PF_DB:/db_pointfinder -v $RF_DB:/db_resfinder resfinder -o resfinder_out -s "Acinetobacter baumannii" --acquired --point -ifa ../raw_dat/fastas/Acinetobacter_baumannii_ab1_genomic.fna
and got the error Error: no module names git in from git import repo
, so git does seem to be the issue here.
Is this a local issue? Can you offer any help to make git functional with the dockerfile?
Comments (5)
-
-
reporter Thanks! Is there a way to be notified when the dockerfile will be update (or is there an expected release date)?
-
Dear Emily,
Unfortunately there is no specific release date. But if you send an email to food-cgehelp@dtu.dk I will notify you when it is done.
Kind regards,
Malene
-
Dear Emily,
A new version of the docker has been released.
Please let us know if you experience any issues.
Kind regards,
Malene, CGE Helpdesk
-
- changed status to resolved
New version of docker released
- Log in to comment
Dear Emily,
Thank you for the interest in ResFinder. With the new version og ResFinder, the Dockerfile has not been updated yet, but we are working on it.
However, I suggest, you clone the newest version of ResFinder like it says in the Readme. So you should use this command instead when installing ResFinder (and not specify a branch):
git clone <https://git@bitbucket.org/genomicepidemiology/resfinder.git>
I hope this helps,
Kind regards,
Malene, CGE Helpdesk