AlgoLab / galig

A graph aligner
GNU General Public License v3.0
25 stars 12 forks source link

Issues with Dockerfile #7

Closed amitfenn closed 2 years ago

amitfenn commented 4 years ago

Hi Luca,

We wrote earlier,

It seems that you don't have biopython installed. But from your first message, it seems that you installed it... Can you import the Bio module from the python3 shell?

I apologize for the delay, however, I was a little too quick to write the dockerfile, I wrote for you. It still doesn't work, unfortunately.

I've been trying to use my docker with BioPython Installed. However, even when the python shell can import pandas, or Bio, asgal can't seem to:

I have no name!@2cfb5973d9f4:/myvol1$ asgal --multi -g Homo_sapiens.GRCh38.dna.primary_assembly.fa -a splicing_variants.gtf -s one_test_1.fastq -s2 one_test_2.fastq -t splicing_variants_transcripts.fa -o asgal_results
Traceback (most recent call last):
  File "/opt/galig/asgal", line 8, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'
I have no name!@2cfb5973d9f4:/myvol1$ python
Python 3.7.4 (default, Aug 13 2019, 20:35:49) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> 
>>> import Bio
>>> 

Furthermore, If I may bring your attention to the Dockerfile you have as well. It had the following error, when building it.

...
In file included from /galig/sdsl-lite/compiled/include/sdsl/rrr_vector.hpp:27:0,
                 from /galig/sdsl-lite/compiled/include/sdsl/bit_vectors.hpp:10,
                 from /galig/src/SplicingGraph.hpp:12,
                 from /galig/src/SplicingGraph.cpp:1:
/galig/sdsl-lite/compiled/include/sdsl/rrr_helper.hpp: In constructor 'sdsl::binomial_coefficients<n>::impl::impl() [with short unsigned int n = 63]':
/galig/sdsl-lite/compiled/include/sdsl/rrr_helper.hpp:251:9: internal compiler error: Segmentation fault
         impl() {
         ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
/galig/Makefile:150: recipe for target 'SplicingGraph.o' failed
make[1]: *** [SplicingGraph.o] Error 1
target.mk:16: recipe for target '/galig/obj' failed
make: *** [/galig/obj] Error 2
The command '/bin/sh -c git clone --recursive https://github.com/AlgoLab/galig.git ;     cd galig ;     make prerequisites ;     make' returned a non-zero code: 2

I use the patch you gave me in my Dockerfile, in the RUN command, before I make salmon and asgal:

wget https://github.com/AlgoLab/galig/files/4437983/CMakeLists.txt.patch.txt ;\
git apply CMakeLists.txt.patch.txt ;\

Of course, you are welcome to a complete Dockerfile as soon as we can compose one together, if you can help.

gdv commented 4 years ago

Dear @amitfenn Let us try to fix this dockerfile once and for all. I have created a new branch (https://github.com/AlgoLab/galig/tree/issue-%237) with a docker directory. Please clone the repo, switch to the issue-#7 branch, go to the docker dir and issue the follwing commands:

docker build -t algolab/asgal:v1.1.1 .
cd ../example
tar xvzf input.tar.gz
docker run  -v $(pwd)/input:/data algolab/asgal:v1.1.1

On my computer, it works™️ ;-) Thanks for your understanding

amitfenn commented 4 years ago

Dear Luca,

I've made some very minor changes to your dockerfile.

  1. I commented out lines 44 and 45 which tries to download and verify gpg keys, cause that killed the docker build command for me.
  2. I added a line after line 60: ENV PATH $PATH:/galig/asgal just to have asgal show up without the full path, but as just another command in this environment.

And otherwise, your Dockerfile is pretty much PERFECT. I tested it out and I have zero complains.

Thank you for all your support, Luca. You have been incredibly helpful and supportive throughout this entire process. I really respect that.

Cheers, Amit

amitfenn commented 2 years ago

Hi Again, Luca.

Thanks for maintaining ASGAL. I noticed your dockerfile doesn't build anymore. I get the following error message at line: 38 of your Dockerfile

* CXX /galig/src/utils.cpp
cc1plus: error: bad value ('tigerlake') for '-march=' switch
cc1plus: note: valid arguments to '-march=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 native
cc1plus: error: bad value ('tigerlake') for '-mtune=' switch
cc1plus: note: valid arguments to '-mtune=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native
make[1]: *** [/galig/Makefile:150: utils.o] Error 1
make: *** [target.mk:17: /galig/obj] Error 2
The command '/bin/sh -c cd galig ; make' returned a non-zero code: 2

Could you please take a second look at the Dockerfile for me? Thanking you, Amit.

gdv commented 2 years ago

Dear @amitfenn Can you confirm that you have tried to build ASGAL on a Tigerlake cpu?

amitfenn commented 2 years ago

Dear Luca, I was on a Tigerlake cpu. But if this is the problem, please don't spend too much time on this. Asgal Dockerfile works almost perfectly on my server, I just tried it out.

I had to modify "FROM ubuntu:20.04" to "FROM ubuntu:20.10", as some of the apt packages where no longer being shipped for 20.04.

Thanks for your time and your quick response. It is very much appreciated. Amit.

gdv commented 2 years ago

I suspect that the gcc version shipped with ubuntu 20.04 does not support the newest CPUs. The docker image (i.e. the one you get with a docker pull) should work on Tigerlake too.

I am leaving this open as a reminder to update the base image to 22.04 once it has been released.

Take care