ncbi / pgap

NCBI Prokaryotic Genome Annotation Pipeline
Other
310 stars 90 forks source link

[BUG] Permission denied in installation #191

Closed ssqd2022 closed 2 years ago

ssqd2022 commented 2 years ago

Permission denied when installing

To Reproduce

./pgap.py --update # required files are downloaded and extracted The latest version of PGAP is 2022-02-10.build5872, you have nothing installed locally. Downloading (as needed) Docker image ncbi/pgap:2022-02-10.build5872 Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=ncbi%2Fpgap&tag=2022-02-10.build5872": dial unix /var/run/docker.sock: connect: permission denied None

Expected behavior A clear and concise description of what you expected to happen.

Software versions (please complete the following information):

Log Files Please rerun pgap.py with the --debug flag and attach an archive (e.g. zip or tarball) of the logs in the directory: debug/tmp-outdir/*/*.log.

Additional context Add any other context about the problem here.

azat-badretdin commented 2 years ago

Thank you for your report! We had a similar message in the past (#172) which was related to SLURM or parallel running of more than one job at a time, but your message seems to be happening very early (during installation).

I wonder if you will be able to download our image from a command line.

docker pull ncbi/pgap:2022-02-10.build5872

Could you please try that?

ssqd2022 commented 2 years ago

Thank you for your prompt response. Unfortunately, I got the similar message

mubil@bioinfo-64:~/pgap$ docker pull ncbi/pgap:2022-02-10.build5872 Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=ncbi%2Fpgap&tag=2022-02-10.build5872": dial unix /var/run/docker.sock: connect: permission denied.

ssqd2022 commented 2 years ago

I have Ubuntu 20.04. Here is what I did before install pgap:

$ sudo apt-get update $ sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg $ echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null $ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io

List the versions available in your repo, then choose one for installation

$ apt-cache madison docker-ce

docker-ce | 5:18.09.1~3-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages docker-ce | 5:18.09.0~3-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages …… sudo apt-get install docker-ce=5:20.10.13~3-0~ubuntu-focal docker-ce-cli=5:20.10.13~3-0~ubuntu-focal containerd.io

azat-badretdin commented 2 years ago

Thanks, can you try docker pull hello-world?

ssqd2022 commented 2 years ago

I tried docker pull hello-world. I also had a permission problem. Then, I used "sudo su" and pull pgap again. It works this time. Do we have to use sudo to install pgap locally? What is the way around this?

azat-badretdin commented 2 years ago

Do we have to use sudo to install pgap locally?

Worth a try. Looks like you have a sudo access... Could you please try that?

azat-badretdin commented 2 years ago

The downside is that it will create reference data in your current directory with root ownership. From the other hand, you can be root, so it should not be a big deal, hopefully.