pangraph icon indicating copy to clipboard operation
pangraph copied to clipboard

Dockerfile/pangraph not building

Open schorlton opened this issue 2 years ago • 1 comments

wget  https://github.com/neherlab/pangraph/archive/refs/tags/0.5.0.tar.gz
tar xzvf 0.5.0.tar.gz
cd pangraph-0.5.0
docker build . -t pangraph/pangraph
# All requested packages already installed.

ERROR: InitError: PyError (PyImport_ImportModule) <class 'NameError'>
NameError("name 'ListType' is not defined")
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/__init__.py", line 61, in <module>
    from .clustering.clustertree import *
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/__init__.py", line 40, in <module>
    from .clustertree import *
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/clustertree.py", line 43, in <module>
    from . import clustvalidation
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/clustvalidation.py", line 199, in <module>
    from . import stats
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/stats.py", line 1933, in <module>
    geometricmean = Dispatch ( (lgeometricmean, (ListType, TupleType)), )

Stacktrace:
 [1] pyimport(name::String)
   @ PyCall ~/.julia/packages/PyCall/3fwVL/src/PyCall.jl:550
 [2] pyimport_conda(modulename::String, condapkg::String, channel::String)
   @ PyCall ~/.julia/packages/PyCall/3fwVL/src/PyCall.jl:714
 [3] __init__()
   @ PanGraph.PanX.Phylo /build_dir/src/panX.jl:21
 [4] _include_from_serialized(path::String, depmods::Vector{Any})
   @ Base ./loading.jl:768
 [5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
   @ Base ./loading.jl:854
 [6] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1097
 [7] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997
during initialization of module Phylo

caused by: PyError (PyImport_ImportModule) <class 'NameError'>
NameError("name 'ListType' is not defined")
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/__init__.py", line 61, in <module>
    from .clustering.clustertree import *
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/__init__.py", line 40, in <module>
    from .clustertree import *
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/clustertree.py", line 43, in <module>
    from . import clustvalidation
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/clustvalidation.py", line 199, in <module>
    from . import stats
  File "/root/.julia/conda/3/lib/python3.9/site-packages/ete3/clustering/stats.py", line 1933, in <module>
    geometricmean = Dispatch ( (lgeometricmean, (ListType, TupleType)), )

Stacktrace:
 [1] pyimport(name::String)
   @ PyCall ~/.julia/packages/PyCall/3fwVL/src/PyCall.jl:550
 [2] pyimport_conda(modulename::String, condapkg::String, channel::String)
   @ PyCall ~/.julia/packages/PyCall/3fwVL/src/PyCall.jl:708
 [3] __init__()
   @ PanGraph.PanX.Phylo /build_dir/src/panX.jl:21
 [4] _include_from_serialized(path::String, depmods::Vector{Any})
   @ Base ./loading.jl:768
 [5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
   @ Base ./loading.jl:854
 [6] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1097
 [7] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997
make: *** [Makefile:34: data/synthetic/test.fa] Error 1
The command 'bash -c set -euxo pipefail && cd /build_dir && make' returned a non-zero code: 2

schorlton avatar Jun 05 '22 02:06 schorlton

Hi @schorlton,

I tried to run your 4-liner on a clean system and it worked just fine. It also worked last time it ran on CI server, but that was perhaps a long time ago, and some things might have changed.

The only hypothesis I have right now: the versions of some of the dependencies are not frozen, so maybe there was a transitive issue in some of the packages, and perhaps these packages were updated by now, so I can no longer reproduce the same error. Can you rerun cleanly and tell if the error still persists?

If it's still there, please provide the full log (wrapped into spoiler tag <details> ``` ``` </details> or as a text file attachment).

Also note that there is a small guide and a makefile target for building the image: https://github.com/neherlab/pangraph/blob/master/docs/dev/buiding-docker.md Notably, this is a multistate dockerfile and you need to specify the prod stage with --target prod to build the correct image. But that is not the problem in this particular case.

Update:

I also managed to run a CI build, off current master: https://github.com/neherlab/pangraph/runs/6811014061?check_suite_focus=true and it completed successfully, with resulting images uploaded as well: https://hub.docker.com/r/neherlab/pangraph/tags It's not 0.5.0, but pehaps can help with investigation.

ivan-aksamentov avatar Jun 09 '22 08:06 ivan-aksamentov