replicate / cog

Containers for machine learning
https://cog.run
Apache License 2.0
7.44k stars 510 forks source link

Check Docker version before running Docker commands #156

Open andreasjansson opened 2 years ago

andreasjansson commented 2 years ago

From Discord: image

We should make sure that the user is running a recent enough version of Docker before we try to run any Docker commands.

a1k0n commented 2 years ago

FWIW, it was indeed a recent docker version; it's just that it was installed with snap and not as a normal app. snaps are installed as mounted filesystems under /var/lib/snapd and it causes issues working across filesystems, like in /tmp. Another mitigation might be to move the Dockerfile into the .cog local dir you're creating anyway, instead of going into /tmp.

a1k0n commented 2 years ago

Anyway, just something to consider next time someone reports cog not working because it can't find /tmp/dockerfile123897648!