cog icon indicating copy to clipboard operation
cog copied to clipboard

Warn if docker is not available due to permissions or installation is missing

Open zknz opened this issue 4 years ago • 2 comments

On Ubuntu I noticed cog failed with a vague message when attempting to use predict from one of the projects on replicate. There could be a check in cog to make sure docker is installed and the current user is able to execute commands. In my case I needed to run cog as root since docker was only accessible as root at that time.

The errors shown to the user with the latest version at the time: v0.0.18, were: Failed to determine if r8.im/... exists: exit status 1 as it fell back to file system checks, and when --debug was used, the docker inspect failed without any further messaging.

zknz avatar Dec 02 '21 06:12 zknz

Thanks for opening this issue, @zknz. Here's some extra context from our conversation in Discord:

$ cog --debug predict r8.im/cjwbw/rudalle-sr@sha256:cf62c87dde3b7a9f0999519f291d7d4f84e5d1883cfa0c986ae79d8a92247966   -i [email protected]   -i scale=4
$ docker image inspect r8.im/cjwbw/rudalle-sr@sha256:cf62c87dde3b7a9f0999519f291d7d4f84e5d1883cfa0c986ae79d8a92247966
ⅹ Failed to determine if r8.im/cjwbw/rudalle-sr@sha256:cf62c87dde3b7a9f0999519f291d7d4f84e5d1883cfa0c986ae79d8a92247966 exists: exit status 1

Cog version:

cog version 0.0.18 (built 2021-11-17T18:31:48Z)

Environment:

Ubuntu 21, GPU is an RTX 3090 and nvidia-docker is all setup

zeke avatar Dec 03 '21 18:12 zeke

Another bit of user feedback: https://discord.com/channels/775512803439280149/852636181492793344/991718132878168137

tl;dr: Docker was installed but the service wasn't running, which caused Cog to fail with an incomprehensible error.

andreasjansson avatar Jun 29 '22 17:06 andreasjansson