hoffmangroup / segway

Application for semi-automated genomic annotation.
http://segway.hoffmanlab.org/
GNU General Public License v2.0
13 stars 7 forks source link

building an image using the dockerfile #151

Closed MahShaaban closed 3 years ago

MahShaaban commented 3 years ago

I downloaded the repo and tried to build an image from the dockerfile docker/Dockerfile using

docker build -t segway -f docker/Dockerfile . 

I got

[+] Building 39.9s (6/9)                                                                                                                                                 
 => [internal] load build definition from Dockerfile_segway2                                                                                                        0.0s
 => => transferring dockerfile: 2.05kB                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                   0.0s
 => => transferring context: 2B                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/ubuntu:latest                                                                                                    0.0s
 => CACHED [1/6] FROM docker.io/library/ubuntu:latest                                                                                                               0.0s
 => [2/6] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends     build-essential     pkg-config     python     pytho  38.6s
 => ERROR [3/6] RUN curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py && python2 get-pip.py                                                             1.2s 
------                                                                                                                                                                   
 > [3/6] RUN curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py && python2 get-pip.py:                                                                        
#6 0.414   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                 
#6 0.414                                  Dload  Upload   Total   Spent    Left  Speed                                                                                   
100 1892k  100 1892k    0     0  2695k      0 --:--:-- --:--:-- --:--:-- 2695k                                                                                           
#6 1.154 ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
------
executor failed running [/bin/sh -c curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py && python2 get-pip.py]: exit code: 1

Any suggestions?

EricR86 commented 3 years ago

The Dockerfile in question is used for testing on remote build machines. The reason why it doesn't work is due to Python updates and the latest LTS release since this image was last built for testing. This test image includes both Python versions for example which is less than ideal and does not include the installation of Segway itself which is also tested (as seen by the commented out line at the bottom of the Dockerfile).

In general, we recommend installing Segway using Bioconda. After it is setup you can simple issue the command conda install segway.

If you want a Docker image to use out-of-the-box still you could try the docker images generated by Bioconda/quay.io. We do not use these at all and I cannot guarantee their usefulness.

If you want to generate your own docker image with Segway installed, you can simply uncomment out the bottom line and keep only the python 3 packages in the list, remove the python2 installation command, and remove the curl for get-pip.

Hope this helps!

Eric

MahShaaban commented 3 years ago

Thanks @EricR86 This was very helpful