cog
cog copied to clipboard
Getting unknown flag: --platform
I am running cog on mac, using colima and also have installed buildx with brew install docker-buildx
. But upon running cog run python
, I get the following error: unknown flag: --platform
. Can you help fix this?
@cs-mshah I can't reproduce this locally, but it sounds like you might be using an old version of BuildKit. Can you share the outputs of the following commands?
docker version
docker buildx version
Output of docker version
:
docker version
Client: Docker Engine - Community
Version: 24.0.5
API version: 1.42 (downgraded from 1.43)
Go version: go1.20.6
Git commit: ced0996600
Built: Wed Jul 19 19:44:22 2023
OS/Arch: darwin/arm64
Context: colima
Server:
Engine:
Version: 23.0.6
API version: 1.42 (minimum version 1.12)
Go version: go1.20.4
Git commit: 9dbdbd4b6d7681bd18c897a6ba0376073c2a72ff
Built: Fri May 12 13:54:36 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v1.7.0
GitCommit: 1fbd70374134b891f97ce19c70b6e50c7b9f4e0d
runc:
Version: 1.1.7
GitCommit: 860f061b76bb4fc671f0f9e900f7d80ff93d4eb7
docker-init:
Version: 0.19.0
GitCommit:
docker buildx version
docker: 'buildx' is not a docker command.
But I did install docker buildx using brew install docker-buildx
@cs-mshah It could be that your PATH
is configured to use something other than what Homebrew installed.
Could you try the following?
$ which docker
If that includes /opt/homebrew
or /usr/local/bin
, then you are running the Homebrew command.
In which, case you might try uninstalling docker-buildx
and installing docker
:
$ brew uninstall docker-buildx
$ brew install docker
The issue still persists.
I am getting this same issue.
@michaelevensen you should have docker buildx plugin
https://stackoverflow.com/questions/75452542/how-to-install-buildx-with-docker-23-0-1
@cs-mshah Encountered the same issue (M1 MacBook Air), but resolved now.
Fix is to install Docker Desktop instead of installing docker
and docker-buildx
separately through brew.
So brew uninstall docker
, brew uninstall docker-buildx
.
Install Docker Desktop. Open after installation, run through setup.
cog run python
from docs/getting-started.md
should now work.