1
$\begingroup$

i dont know how to build/pull this container (https://codebase.helmholtz.cloud/proteinprompt/ProteinPrompt) can you advice me how to install it?

EDIT:

My soft - Ubuntu 20.04 lts

Thanks to @M__ I manage to build image (almost). But I have an issue :

roboczy@marcin-B550-AORUS-ELITE-AX-V2:/home/marcin/ProteinPrompt$ docker build -t dockerfile .
[+] Building 1.0s (15/15) FINISHED                                              
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 1.19kB                                     0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/continuumio/miniconda3:4.10.3-  0.9s
 => [ 1/10] FROM docker.io/continuumio/miniconda3:4.10.3-alpine@sha256:e0  0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 650B                                          0.0s
 => CACHED [ 2/10] RUN rm /bin/sh && ln -s /bin/bash /bin/sh               0.0s
 => CACHED [ 3/10] RUN conda update -n base conda                          0.0s
 => CACHED [ 4/10] COPY ./data/proteinPrompt.yml /                         0.0s
 => CACHED [ 5/10] RUN conda env update --name root -f /proteinPrompt.yml  0.0s
 => CACHED [ 6/10] RUN mkdir /proteinPrompt/                               0.0s
 => CACHED [ 7/10] COPY ./proteinPrompt/*py /proteinPrompt/                0.0s
 => CACHED [ 8/10] RUN mkdir /model/                                       0.0s
 => CACHED [ 9/10] RUN wget https://zenodo.org/record/5708224/files/rf_hu  0.0s
 => CACHED [10/10] COPY ./data/all.proteins.HUMAN.autocorrelation.pbz2 /m  0.0s
 => exporting to image                                                     0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:ae93ff408fb6468280a5f0344bb2ac5ac811df2e5d32a  0.0s
 => => naming to docker.io/library/dockerfile                              0.0s
WARNING: buildx: failed to read current commit information with git rev-parse --is-inside-work-tree

and image is named 'dockerfile'? and it do not work

roboczy@marcin-B550-AORUS-ELITE-AX-V2:/home/marcin/ProteinPrompt$ docker images
REPOSITORY    TAG           IMAGE ID       CREATED          SIZE
dockerfile    latest        ae93ff408fb6   11 minutes ago   2.02GB
alphafold     latest        c41a4b5e9d48   13 days ago      10GB
nvidia/cuda   11.0.3-base   4f3e95122fab   23 months ago    122MB

roboczy@marcin-B550-AORUS-ELITE-AX-V2:/home/marcin/ProteinPrompt$ docker run  -v $(pwd)/data:/data proteinprompt search -f data/input.fa -o data/output.csv
Unable to find image 'proteinprompt:latest' locally
docker: Error response from daemon: pull access denied for proteinprompt, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

EDIT 2:

I try to edit dockerfile (in several places)

FROM continuumio/miniconda3:4.10.3-alpine
MAINTAINER Sebastian Canzler <[email protected]>
LABEL authors="[email protected]" \
    description="Docker image of ProteinPrompt - a tool to predict protein-protein interactions based on amino acid sequences."
RUN apt-get update && apt-get install -y git #<-----HERE

#Try This to get a bash in order to run 'source activate modfinder'
RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN conda update -n base conda
COPY ./data/proteinPrompt.yml /
RUN conda env update --name root -f /proteinPrompt.yml && \
    rm -rf /opt/conda/pkgs/*
ENV PATH /opt/conda/envs/proteinPrompt/bin:$PATH
# copy the proteinPrompt files
RUN mkdir /proteinPrompt/
COPY ./proteinPrompt/*py /proteinPrompt/
ENV PATH /proteinPrompt:$PATH

# get the random forest model from zenodo
RUN mkdir /model/
#COPY ./data/rf_human_750_inv.rev.pkl /model/random_forest.pkl
RUN wget https://zenodo.org/record/5708224/files/rf_human_750_inv.rev.pkl?download=1 -O /model/random_forest.pkl
COPY ./data/all.proteins.HUMAN.autocorrelation.pbz2 /model/all.proteins.HUMAN.autocorrelation.pbz2



# make proteinPrompt executable
ENTRYPOINT ["python", "/proteinPrompt/ProteinPrompt.py"]
#CMD ["-h"]

but there is a bash problem:

roboczy@marcin-B550-AORUS-ELITE-AX-V2:/home/marcin/ProteinPrompt$ docker build -t dockerfile .
[+] Building 1.6s (10/15)                                                       
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 1.23kB                                     0.0s
 => [internal] load metadata for docker.io/continuumio/miniconda3:4.10.3-  1.0s
 => [ 1/11] FROM docker.io/continuumio/miniconda3:4.10.3-alpine@sha256:e0  0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 650B                                          0.0s
 => CACHED [ 2/11] RUN rm /bin/sh && ln -s /bin/bash /bin/sh               0.0s
 => CACHED [ 3/11] RUN conda update -n base conda                          0.0s
 => CACHED [ 4/11] COPY ./data/proteinPrompt.yml /                         0.0s
 => CACHED [ 5/11] RUN conda env update --name root -f /proteinPrompt.yml  0.0s
 => ERROR [ 6/11] RUN apt-get update && apt-get install -y git             0.5s
------
 > [ 6/11] RUN apt-get update && apt-get install -y git:
#0 0.537 /bin/ash: apt-get: not found
------
WARNING: buildx: failed to read current commit information with git rev-parse --is-inside-work-tree
Dockerfile:15
--------------------
  13 |         rm -rf /opt/conda/pkgs/*
  14 |     ENV PATH /opt/conda/envs/proteinPrompt/bin:$PATH
  15 | >>> RUN apt-get update && apt-get install -y git
  16 |     
  17 |     # copy the proteinPrompt files
--------------------
ERROR: failed to solve: process "/bin/ash -eo pipefail -c apt-get update && apt-get install -y git" did not complete successfully: exit code: 127

EDIT 3:

roboczy@marcin-B550-AORUS-ELITE-AX-V2:/home/marcin/ProteinPrompt$ docker pull registry.hzdr.de/proteinprompt/proteinprompt:latest
latest: Pulling from proteinprompt/proteinprompt
5843afab3874: Already exists 
72c585c386a3: Already exists 
87d798ddb41c: Already exists 
316f048b0253: Pull complete 
ae11eb6b6512: Pull complete 
d3dc3767a31c: Pull complete 
ea3dbaf26ce1: Pull complete 
061c354f8f77: Pull complete 
60eb5484e32a: Pull complete 
0625cf0fe317: Pull complete 
442818fdc663: Pull complete 
203550cafc1f: Pull complete 
Digest: sha256:01f0251f34313437e5fcc2dbb26d1ec1103d50aef6335b2261a2048be8ed0813
Status: Downloaded newer image for registry.hzdr.de/proteinprompt/proteinprompt:latest
registry.hzdr.de/proteinprompt/proteinprompt:latest


roboczy@marcin-B550-AORUS-ELITE-AX-V2:/home/marcin/ProteinPrompt$ docker images
REPOSITORY                                     TAG           IMAGE ID       CREATED         SIZE
alphafold                                      latest        c41a4b5e9d48   13 days ago     10GB
registry.hzdr.de/proteinprompt/proteinprompt   latest        cd99d22f3cb2   18 months ago   1.93GB
nvidia/cuda                                    11.0.3-base   4f3e95122fab   23 months ago   122MB


roboczy@marcin-B550-AORUS-ELITE-AX-V2:/home/marcin/ProteinPrompt$ docker run  -v $(pwd)/data:/data proteinprompt search -f data/input.fa -o data/output.csv
Unable to find image 'proteinprompt:latest' locally
docker: Error response from daemon: pull access denied for proteinprompt, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

Do you know what is wrong?


Final approach,

docker pull registry.hzdr.de/proteinprompt/proteinprompt:latest
$\endgroup$
5
  • $\begingroup$ On what operating system? Please edit your question and add your OS, and what you have tried so far (and how it failed) so we don't tell you things you already know don't work. $\endgroup$
    – terdon
    Jun 1 at 13:41
  • $\begingroup$ @M__ thanks, but i have new issue... At least I'll learn the docker $\endgroup$
    – MTG
    Jun 3 at 15:31
  • $\begingroup$ @M__ I pull it docker pull registry.hzdr.de/proteinprompt/proteinprompt:latest :) $\endgroup$
    – MTG
    Jun 3 at 16:08
  • $\begingroup$ Okay, I see ... right. It's an alpine docker container. It will not have apt-get, there is a different command for apt-get in alpine its not apt-get but I don't know what it is. Sorry thats my fault. I was thinking it would be using Ubuntu or Debian - but no its alpine. Alpine is smaller thats why it's being used - but has very little in it. It would have been alot easier to use Ubuntu/Debian, the authors should have included git in the container. $\endgroup$
    – M__
    Jun 3 at 17:11
  • $\begingroup$ Anwer is RUN apk update thanks for support! $\endgroup$
    – MTG
    Jun 6 at 16:49

1 Answer 1

1
$\begingroup$

The docker file is here https://codebase.helmholtz.cloud/proteinprompt/ProteinPrompt/-/blob/main/Dockerfile

You need to download and install a copy of Docker (below).

These are the instructions how to build the container locally from the remote Docker file. Copy and paste this code into a file called Dockerfile. Here I placed it in a tmp directory, then simply (see note)

 docker build -t tmp/dockerfile .

Just to note the authors may have specific instructions for the build command.

How to install Docker Before this command is run you need to install docker here https://www.docker.com/products/docker-desktop/

After installation you need a special command to run Docker in sudo-less mode is:

sudo usermod -aG docker

The first command I gave will then build the Dockerfile. There quite a lot of commands BTW to run/execute a Dockerfile, but you can also ask more questions.


Why am I recommending this way?

Simple, because normally downloading docker is done via https://docker.com and you would issue a pull request. For some weird reason the authors haven't done this and I don't know what the outcome of an external download is. If it is built via the Dockerfile then Docker will recognise the Docker container. Once the container is built locally you can upload it to your own Docker site and delete it locally and access it any time via a pull request or a run request (will automate a pull request).

Docker is very cool BTW, worth learning.


Comments, following bug report

I don't think you've got git installed (apt-get install -y git). Once that is installed I would would try again. BUT FIRST I would delete the current build docker rmi dockerfile. If docker rmi ... fails (I don't think it will) then remove all containers before deleting the image with docker rm $(docker ps -qa). The use rmi and then install git apt-get install -y git and do the docker build command.

If this doesn't work (same error) ..... you need to alter the Dockerfile and build it again from the new file .. Its a bug by the authors simply add the line RUN apt-get update && apt-get install -y git ... This is because there's a chance that git needs to be on the inside of the container not the outside.

If all the above fails, I would download the entire image/container from the website the authors have loaded it. I don't know how to pull from a non-docker website, I've never done it. Note I'll place these comments in an updated post. I am honestly skeptical about the authors ability to write/develop Docker.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.