a-r-j / graphein

Protein Graph Library
https://graphein.ai/
MIT License
1.02k stars 129 forks source link

is there a docker image on the hub #235

Closed skr3178 closed 1 year ago

skr3178 commented 1 year ago

is there a docker image on the hub? On doing a search it seems there isn't on existing.

There seems to be multiple docker configuration with different dates of last update. How to use docker build for a CPU without GPU support (which config to be used)?

a-r-j commented 1 year ago

Hi @skr3178

We're not on dockerhub AFAIK.

Have you tried the instructions here: https://graphein.ai/getting_started/installation.html#docker-install

Let me know how you get on :)

skr3178 commented 1 year ago

sudo docker compose -f docker-compose.cpu.yml up -d --build

a-r-j commented 1 year ago

Did it work for you? Can I close the issue?

skr3178 commented 1 year ago

https://github.com/docker/docs/issues/16210 not able to open the container port

a-r-j commented 1 year ago

@rg314 Maybe you've got some insight?

rg314 commented 1 year ago

sudo docker compose -f docker-compose.cpu.yml up -d --build

@skr3178 Please can you let me know what the output of this command is?

rg314 commented 1 year ago

You can also expose the port in the compose file https://github.com/a-r-j/graphein/blob/5118331c8b70a5d6c7b47b5c3f38f3c5c7a941cd/docker-compose.yml#L4 see https://docs.docker.com/compose/networking/

skr3178 commented 1 year ago

sudo docker compose -f docker-compose.cpu.yml up -d --build

@skr3178 Please can you let me know what the output of this command is?

This command created an image after running 26 odd commands. This was successfull. The image created is graphein-cpu image

rg314 commented 1 year ago

Run docker-compose logs

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: skr3178 @.> Sent: Wednesday, November 23, 2022 6:07:25 PM To: a-r-j/graphein @.> Cc: Ryan Greenhalgh @.>; Mention @.> Subject: Re: [a-r-j/graphein] is there a docker image on the hub (Issue #235)

sudo docker compose -f docker-compose.cpu.yml up -d --build

@skr3178https://github.com/skr3178 Please can you let me know what the output of this command is?

This command created an image after running 26 odd commands. This was successfull. The image created is graphein-cpu [image]https://user-images.githubusercontent.com/79299617/203607150-3fa06b9d-40ac-426d-a133-99b45f0ed9db.png

— Reply to this email directly, view it on GitHubhttps://github.com/a-r-j/graphein/issues/235#issuecomment-1325399888, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AISU6OTCKIAX3JHBY6XZ4ETWJZFM3ANCNFSM6AAAAAASHAGZ5A. You are receiving this because you were mentioned.Message ID: @.***>

skr3178 commented 1 year ago

(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ sudo docker compose -f docker-compose.cpu.yml up -d --build
> 

[+] Building 0.7s (27/27) FINISHED                                         
 => [internal] load build definition from Dockerfile                  0.0s
 => => transferring dockerfile: 32B                                   0.0s
 => [internal] load .dockerignore                                     0.0s
 => => transferring context: 2B                                       0.0s
 => [internal] load metadata for docker.io/pytorch/pytorch:1.9.1-cud  0.6s
 => [ 1/22] FROM docker.io/pytorch/pytorch:1.9.1-cuda11.1-cudnn8-run  0.0s
 => [internal] load build context                                     0.0s
 => => transferring context: 199B                                     0.0s
 => CACHED [ 2/22] RUN apt-get update     && apt-get -y install buil  0.0s
 => CACHED [ 3/22] RUN apt-get update && apt-get install -y iputils-  0.0s
 => CACHED [ 4/22] RUN apt-get update && apt-get install -y ncbi-bla  0.0s
 => CACHED [ 5/22] RUN mkdir -p graphein/requirements                 0.0s
 => CACHED [ 6/22] WORKDIR /graphein                                  0.0s
 => CACHED [ 7/22] COPY .requirements /graphein/requirements          0.0s
 => CACHED [ 8/22] RUN echo "$(cat requirements/base.in)" >> require  0.0s
 => CACHED [ 9/22] RUN pip install -r requirements.txt --no-cache-di  0.0s
 => CACHED [10/22] RUN conda install -c conda-forge libgcc-ng         0.0s
 => CACHED [11/22] RUN conda install scipy scikit-learn matplotlib p  0.0s
 => CACHED [12/22] RUN pip install ticc==0.1.4 --no-cache-dir         0.0s
 => CACHED [13/22] RUN conda install -c conda-forge vmd-python        0.0s
 => CACHED [14/22] RUN git clone https://github.com/getcontacts/getc  0.0s
 => CACHED [15/22] RUN conda install -c fvcore -c iopath -c conda-fo  0.0s
 => CACHED [16/22] RUN conda install -c pytorch3d pytorch3d           0.0s
 => CACHED [17/22] RUN conda install -c dglteam dgl                   0.0s
 => CACHED [18/22] RUN conda install -c salilab dssp                  0.0s
 => CACHED [19/22] RUN conda install -c conda-forge ipywidgets        0.0s
 => CACHED [20/22] RUN export CUDA=$(python -c "import torch; print(  0.0s
 => CACHED [21/22] RUN pip install jupyter_contrib_nbextensions       0.0s
 => CACHED [22/22] RUN jupyter nbextension enable --py widgetsnbexte  0.0s
 => exporting to image                                                0.0s
 => => exporting layers                                               0.0s
 => => writing image sha256:c495fb0862342d656945c850713ccb0b90001a67  0.0s
 => => naming to docker.io/library/graphein-cpu:latest                0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
strconv.Atoi: parsing "": invalid syntax
skr3178 commented 1 year ago
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs
Attaching to 
rg314 commented 1 year ago

Sorry this wasn't clear you might need to put the service name as well I.e

'docker-compose logs graphein-gpu' or

'docker-compose logs graphein-cpu'

skr3178 commented 1 year ago
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker image ls        REPOSITORY     TAG       IMAGE ID       CREATED         SIZE
graphein-cpu   latest    c495fb086234   14 hours ago    13GB
nginx          alpine    19dd4d73108a   11 days ago     23.5MB
snyk/snyk      <none>    c3296d24f970   6 weeks ago     210MB
hello-world    latest    feb5d9fea6a5   14 months ago   13.3kB
verb/socat     latest    66741bf77bed   4 years ago     129MB
bobrik/socat   latest    e617a56c238e   7 years ago     6.95MB
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs c495fb086234
ERROR: No such service: c495fb086234
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker run -it -d -p 8081:80/tcp -p 8081:80/udp c495fb086234
e869b9713f9ef62e547d60ee9b47d008776d3c572a6902d29c5f7bd9578d17be
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker ps
CONTAINER ID   IMAGE          COMMAND   CREATED         STATUS         PORTS                                                                          NAMES
e869b9713f9e   c495fb086234   "bash"    3 seconds ago   Up 2 seconds   0.0.0.0:8081->80/tcp, 0.0.0.0:8081->80/udp, :::8081->80/tcp, :::8081->80/udp   sleepy_nobel
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs c495fb086234
ERROR: No such service: c495fb086234
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs e869b9713f9e
ERROR: No such service: e869b9713f9e
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs graphein-cpu
ERROR: No such service: graphein-cpu
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ sudo docker-compose -f docker-compose.cpu.yml logs
Attaching to graphein-graphein-cpu-1
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ sudo docker-compose -f docker-compose.cpu.yml logs
Attaching to graphein-graphein-cpu-1
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ sudo docker-compose -f docker-compose.cpu.yml logs graphein-cpu
Attaching to graphein-graphein-cpu-1
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs graphein-cpu
ERROR: No such service: graphein-cpu
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs graphein-grahein-cpu-1
ERROR: No such service: graphein-grahein-cpu-1
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ docker-compose logs graphein-graphein-cpu-1
ERROR: No such service: graphein-graphein-cpu-1
(base) ubuntu@ip-172-31-20-167:~/graphein/graphein$ 

not sure what should be looked at

rg314 commented 1 year ago

Are you on the master branch? I just tested and it worked for me

skr3178 commented 1 year ago

Are you on the master branch? I just tested and it worked for me

Can you post the code lines to reproduce the same?

rg314 commented 1 year ago

Are you on the master branch? I just tested and it worked for me

Can you post the code lines to reproduce the same?

git clone https://github.com/a-r-j/graphein.git
cd graphein
docker-compose -f docker-compose.cpu.yml up -d --build
ryan@ryan:~/GitHub/contrib/graphein$ docker -v && docker-compose --version
Docker version 20.10.20, build 9fdeb9c
docker-compose version 1.29.2, build 5becea4c
skr3178 commented 1 year ago

Host machine

!git clone https://github.com/a-r-j/graphein.git
!cd graphein
sudo docker compose -f docker-compose.cpu.yml up -d --build
sudo docker run -it p 8888:8888 <image:version>

Inside the Container (Bash shell): root: jupyter notebook --ip 0.0.0.0 --no-browser --allow-root Host machine access this url : localhost:8888/tree‌

reference

Thank you @a-r-j @rg314 for your help and this tool