healthonrails / annolid

An annotation and instance segmentation-based multiple animal tracking and behavior analysis package.
Other
39 stars 9 forks source link

Docker installation fails #46

Closed shamavir closed 2 years ago

shamavir commented 2 years ago

Installed current main of Annolid on Docker based on https://annolid.com/content/docker_container.html on a new clean install of Ubuntu 20.04, fully updated. Cloned the repo fine, installed Docker fine, Docker annolid build failed as shown below.

thom@ubuntu:~/annolid$ cd docker
thom@ubuntu:~/annolid/docker$ docker build .
Sending build context to Docker daemon  4.096kB
Step 1/27 : FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu18.04
11.1.1-cudnn8-devel-ubuntu18.04: Pulling from nvidia/cuda
11323ed2c653: Pull complete 
dd863c04305c: Pull complete 
fa3c909e0bb9: Pull complete 
fe5a342ebd1c: Pull complete 
438ead696e0a: Pull complete 
64ad1b97ccf1: Pull complete 
3d2828419877: Pull complete 
4f30b95f46fb: Pull complete 
3c40c3b182a2: Pull complete 
9625d77fe3fb: Pull complete 
Digest: sha256:946af2adfbb5070504ec6d75f4cbe90a41ba5e5986eb816c43b70fa481c85670
Status: Downloaded newer image for nvidia/cuda:11.1.1-cudnn8-devel-ubuntu18.04
 ---> caa34d040654
Step 2/27 : LABEL maintainer "Chen Yang <healthonrails@gmail.com>"
 ---> Running in 6972ccf29c52
Removing intermediate container 6972ccf29c52
 ---> 79d475bb33e9
Step 3/27 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Running in daee01eaf0fb
Removing intermediate container daee01eaf0fb
 ---> 266ff999481d
Step 4/27 : RUN   apt-get update -qq &&   apt-get install -qq -y     git     wget     ca-certificates     python3     python3-pip     python3-matplotlib     python3-pyqt5     python3-opencv     python3-dev     sudo     ninja-build    ffmpeg     && rm -rf /var/lib/apt/lists/*
 ---> Running in 0584ba1d0d91
W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is not signed.
The command '/bin/sh -c apt-get update -qq &&   apt-get install -qq -y     git     wget     ca-certificates     python3     python3-pip     python3-matplotlib     python3-pyqt5     python3-opencv     python3-dev     sudo     ninja-build    ffmpeg     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
thom@ubuntu:~/annolid/docker$ 
healthonrails commented 2 years ago

Could you please try the following command and let me know how it works?

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  A4B469963BF863CC
healthonrails commented 2 years ago

Tested and found a worked solution by adding apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC to the Dockerfile in annolid/docker folder. Here are the steps to get the newly updated Dockerfile and build it.

cd annolid
git pull
cd annolid/docker
docker build -t annolid:v1 .

It takes a while to build the docker image. To find the build docker image, please try the following command.

annolid/docker$ docker images
REPOSITORY                TAG                               IMAGE ID       CREATED          SIZE
annolid                   v1                                bx28a4a8818f   11 minutes ago   19.2GB

Finally, we can launch Annolid as follows.

docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix/ -e DISPLAY=$DISPLAY  bx28a4a8818f
shamavir commented 2 years ago

Sorry, didn’t get to this in time to help! I’m doing your next solution right now…

:^)

-- Thomas A. Cleland Systems & Computational Neuroscience Dept. of Psychology, Cornell University 278E Uris Hall, Ithaca, NY 14853 @.**@.> , http://cplab.nethttp://cplab.net/

From: Chen Yang @.> Sent: Tuesday, May 3, 2022 6:53 PM To: healthonrails/annolid @.> Cc: Thomas A. Cleland @.>; Author @.> Subject: Re: [healthonrails/annolid] Docker installation fails (Issue #46)

Could you please try the following command and let me know how it works?

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC

— Reply to this email directly, view it on GitHubhttps://github.com/healthonrails/annolid/issues/46#issuecomment-1116734155, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJFO64UUSOQMMH2Q5FGZ5TVIGU6HANCNFSM5VAHSHXQ. You are receiving this because you authored the thread.Message ID: @.***>

shamavir commented 2 years ago

Hi Chen –

That worked! So this is now the new official method for Docker installation, then?

Thanks :^) Thom

-- Thomas A. Cleland Systems & Computational Neuroscience Dept. of Psychology, Cornell University 278E Uris Hall, Ithaca, NY 14853 @.**@.> , http://cplab.nethttp://cplab.net/

From: Chen Yang @.> Sent: Tuesday, May 3, 2022 7:50 PM To: healthonrails/annolid @.> Cc: Thomas A. Cleland @.>; Author @.> Subject: Re: [healthonrails/annolid] Docker installation fails (Issue #46)

Tested and found a worked solution by adding apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC to the Dockerfile in annolid/docker folder. Here are the steps to get the newly updated Dockerfile and build it.

cd annolid

git pull

cd annolid/docker

docker build -t annolid:v1 .

It takes a while to build the docker image. To find the build docker image, please try the following command.

annolid/docker$ docker images

REPOSITORY TAG IMAGE ID CREATED SIZE

annolid v1 bx28a4a8818f 11 minutes ago 19.2GB

Finally, we can launch Annolid as follows.

docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix/ -e DISPLAY=$DISPLAY bx28a4a8818f

— Reply to this email directly, view it on GitHubhttps://github.com/healthonrails/annolid/issues/46#issuecomment-1116767740, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJFO67FXYJUFU3FZX7N5I3VIG3T7ANCNFSM5VAHSHXQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

healthonrails commented 2 years ago

A4B469963BF863CC Glad to know that the solution works for now. We might need to update NVIDIA's public key A4B469963BF863CC as discussed here https://forums.developer.nvidia.com/t/gpg-error-http-developer-download-nvidia-com-compute-cuda-repos-ubuntu1804-x86-64/212904.

jeremyforest commented 2 years ago

That should only be temporary until NVIDIA updates their public key. We should make a note just in case the error is encountered but I don't think it should last.

healthonrails commented 2 years ago

Fixed it.