FelixKrueger / TrimGalore

A wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming to FastQ files, with extra functionality for RRBS data
GNU General Public License v3.0
459 stars 149 forks source link

Trim-galore not compatible with latest python inside docker container. #169

Closed jorgeamaya closed 1 year ago

jorgeamaya commented 1 year ago

I have a minimal Dockerfile that invokes trimgalore

FROM continuumio/miniconda3

RUN conda config \
    --add channels defaults \
    --add channels bioconda \
    --add channels conda-forge

RUN conda install -y trim-galore

This used to run fine a few weeks ago, but all of a sudden my container is failing to build. I'm working on a Mac with M2 chip, but I need cross platform capabilities. For this reason I have added the --platform flag.

docker build --platform linux/amd64 -t my_name/my_container:v1 .

[+] Building 208.2s (7/7) FINISHED                                                    docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                  0.0s
 => => transferring dockerfile: 2.63kB                                                                0.0s
 => [internal] load .dockerignore                                                                     0.0s
 => => transferring context: 2B                                                                       0.0s
 => [internal] load metadata for docker.io/continuumio/miniconda3:latest                              0.5s
 => [auth] continuumio/miniconda3:pull token for registry-1.docker.io                                 0.0s
 => [1/3] FROM docker.io/continuumio/miniconda3@sha256:42cd2ca0ece04579b6127e1a1a0f83c25a079145d408e  0.0s
 => CACHED [2/3] RUN conda config     --add channels defaults     --add channels bioconda     --add   0.0s
 => ERROR [3/3] RUN conda install -y trim-galore                                                    207.6s
------                                                                                                     
 > [3/3] RUN conda install -y trim-galore:                                                                 
0.526 Collecting package metadata (current_repodata.json): ...working... done                              
17.36 Solving environment: ...working... unsuccessful initial attempt using frozen solve. Retrying with flexible solve.                                                                                               
21.50 Solving environment: ...working... unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
28.42 Collecting package metadata (repodata.json): ...working... done
106.0 Solving environment: ...working... unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
142.0 Solving environment: ...working... 
200.1 Found conflicts! Looking for incompatible packages.
200.1 This can take several minutes.  Press CTRL-C to abort.
failed                                                                                  
200.4 
200.4 UnsatisfiableError: The following specifications were found
200.4 to be incompatible with the existing python installation in your environment:
200.4 
200.4 Specifications:
200.4 
200.4   - trim-galore -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|3.4.*']
200.4 
200.4 Your python: python=3.11
200.4 
200.4 If python is on the left-most side of the chain, that's the version you've asked for.
200.4 When python appears to the right, that indicates that the thing on the left is somehow
200.4 not available for the python version you are constrained to. Note that conda will not
200.4 change your python version to a different minor version unless you explicitly specify
200.4 that.
200.4 
200.4 The following specifications were found to be incompatible with your system:
200.4 
200.4   - feature:/linux-64::__glibc==2.31=0
200.4   - python=3.11 -> libgcc-ng[version='>=11.2.0'] -> __glibc[version='>=2.17']
200.4 
200.4 Your installed version is: 2.31
200.4 
200.4 
------
Dockerfile:8
--------------------
   6 |         --add channels conda-forge
   7 |     
   8 | >>> RUN conda install -y trim-galore 
   9 |     
  10 |     #RUN conda install -y pandas
--------------------
ERROR: failed to solve: process "/bin/sh -c conda install -y trim-galore" did not complete successfully: exit code: 1

Is there a know reason for this error? How can I solve it?

FelixKrueger commented 1 year ago

This seems to be more of a Docker / Conda issue, and I am afraid I don't really know the answer to this. There have been some issues recently where folks have mentioned conda and M1 (which I assume is similar to the M2 issues), e.g. here: https://github.com/FelixKrueger/TrimGalore/issues/168 . Maybe you can get more help from the Docker / Conda community?

jorgeamaya commented 1 year ago

You're right. It seems that the python in the newest version of the docker container is conflicting with trim-galore. I was able to patch this issue by reverting to a previous version of the miniconda container.

FROM continuumio/miniconda3:23.3.1-0