cog icon indicating copy to clipboard operation
cog copied to clipboard

Cog Build fails with unrecognised --cache-to flag

Open 8W9aG opened this issue 1 year ago • 1 comments

Running cog build with the following docker config in a Ubuntu virtual machine:

Client:
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.21.1
 Git commit:        24.0.7-0ubuntu2~22.04.1
 Built:             Wed Mar 13 20:23:54 2024
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.21.1
  Git commit:       24.0.7-0ubuntu2~22.04.1
  Built:            Wed Mar 13 20:23:54 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.12
  GitCommit:        
 runc:
  Version:          1.1.12-0ubuntu2~22.04.1
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        

Produces the following:

Building Docker image from environment in cog.yaml as cog-xxx...
⚠ Stripping patch version from Python version 3.11.9 to 3.11
⚠ Stripping patch version from Python version 3.11.9 to 3.11
unknown flag: --cache-to
See 'docker --help'.

Ideally this should be worked around to check if docker supports the --cache-to flag.

8W9aG avatar Aug 15 '24 16:08 8W9aG

same error. any recommendations?

UPD: The problem was that the docker-buildx-plugin was not installed. It is installed, for example, as described here, in the answers . After that everything works.

Nehc avatar Sep 07 '24 19:09 Nehc