You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the run_deepvariant and similar bash wrappers use just python3 as the interpreter for the corresponding run_deepvariant.py etc scripts, meaning the python interpreter is picked from $PATH at runtime. While generally advisable, in the case of a docker image we do want to force the use of the specific docker-image-wide python3, /usr/bin/python3. This way, the python executable with all dependencies installed is used, irrespective of any user shell configuration exposed to the container that might set PATH such that some external python3 is preferred above the image-wide one. This is particularly a problem with apptainer, which by default maps a user's home directory, so that if someone has a python3 installed in e.g. ~/opt with $PATH set to prefer that above /usr/bin, then the python3 from e.g. ~/opt/python3/bin/python3 will have higher PATH priority than the (docker-image) /usr/bin/python3.
AFAICT this would be easily fixed by using /usr/bin/python3 in place of just python3 here, and subsequent occurrences
I'm happy to make a PR, if you accept them from folks outside google.
This is also the very simple workaround: in place of /opt/deepvariant/bin/run_deepvariant, use /usr/bin/python3 /opt/deepvariant/bin/run_deepvariant.py, however this probably still should be fixed as the docs use the bash wrapper.
Setup
Operating system: Any unix, but I am on Debian 12
DeepVariant version: 1.6 and 1.8
Installation method (Docker, built from source, etc.): Docker via apptainer
Type of data: (sequencing instrument, reference genome, anything special that is unlike the case studies?)
Steps to reproduce:
Command: Set PATH such that some other python3 is preferred over /usr/bin, and map that path through with docker/apptainer. There will be import errors, as these "external" pythons don't have deepvariant or deps installed.
Great, thanks. I tested it "manually" in that I used vi to change it for run_deepvariant in a container, but I didn't test the modifications I suggested to the docker build script. The effect should be identical, so long as I understand the docker build process correctly.
Have you checked the FAQ? https://github.com/google/deepvariant/blob/r1.8/docs/FAQ.md:
Describe the issue:
Currently, the
run_deepvariant
and similar bash wrappers use justpython3
as the interpreter for the correspondingrun_deepvariant.py
etc scripts, meaning the python interpreter is picked from $PATH at runtime. While generally advisable, in the case of a docker image we do want to force the use of the specific docker-image-wide python3,/usr/bin/python3
. This way, the python executable with all dependencies installed is used, irrespective of any user shell configuration exposed to the container that might set PATH such that some external python3 is preferred above the image-wide one. This is particularly a problem with apptainer, which by default maps a user's home directory, so that if someone has apython3
installed in e.g.~/opt
with $PATH set to prefer that above/usr/bin
, then the python3 from e.g.~/opt/python3/bin/python3
will have higher PATH priority than the (docker-image)/usr/bin/python3
.AFAICT this would be easily fixed by using
/usr/bin/python3
in place of justpython3
here, and subsequent occurrencesdeepvariant/Dockerfile
Line 96 in 432d616
I'm happy to make a PR, if you accept them from folks outside google.
This is also the very simple workaround: in place of
/opt/deepvariant/bin/run_deepvariant
, use/usr/bin/python3 /opt/deepvariant/bin/run_deepvariant.py
, however this probably still should be fixed as the docs use the bash wrapper.Setup
Steps to reproduce:
Does the quick start test work on your system?
Please test with https://github.com/google/deepvariant/blob/r0.10/docs/deepvariant-quick-start.md.
Is there any way to reproduce the issue by using the quick start?
Any additional context:
The text was updated successfully, but these errors were encountered: