Open davehorton opened 9 months ago
Same here, quickstart won't work on Apple Silicon:
cog predict -i image=@input.jpg --debug
Building Docker image from environment in cog.yaml... Generated requirements.txt: pillow==9.5.0 tensorflow==2.12.0 $ docker buildx build --platform linux/amd64 --load --cache-to type=inline --file - --tag cog-quickstart-base --progress auto . [+] Building 1.1s (11/11) FINISHED docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 294B 0.0s => resolve image config for docker-image://docker.io/docker/dockerfile:1.4 0.7s => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for r8.im/cog-base:python3.11 0.2s => [internal] load build context 0.0s => => transferring context: 240B 0.0s => [1/4] FROM r8.im/cog-base:python3.11@sha256:55a1644ecbe88d767a957d069fa9fa86ace75d7c947b7fe0f10ddf8ff161ddca 0.0s => CACHED [2/4] COPY .cog/tmp/build20240807113304.588273463898349/requirements.txt /tmp/requirements.txt 0.0s => CACHED [3/4] RUN pip install -r /tmp/requirements.txt 0.0s => CACHED [4/4] WORKDIR /src 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => preparing layers for inline cache 0.0s => => writing image sha256:57d0fc3111b8be6995d830e5aaa0be6b4905645802e86ef3154a96ea3ba1d1cd 0.0s => => naming to docker.io/library/cog-quickstart-base 0.0s
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/unxpfgvs8qtefdakf8wnb6fv0
Starting Docker image cog-quickstart-base and running setup()... $ docker run --rm --shm-size 6G --detach --env COG_LOG_LEVEL=debug --publish 0:5000 --mount type=bind,source=/Users/yoto/Projects/cog-quickstart,destination=/src cog-quickstart-base {"logger": "uvicorn.error", "timestamp": "2024-08-07T09:33:07.225869Z", "severity": "INFO", "message": "Started server process [7]"} {"logger": "uvicorn.error", "timestamp": "2024-08-07T09:33:07.226828Z", "severity": "INFO", "message": "Waiting for application startup."} {"logger": "uvicorn.error", "timestamp": "2024-08-07T09:33:07.233051Z", "severity": "INFO", "message": "Application startup complete."} {"logger": "uvicorn.error", "timestamp": "2024-08-07T09:33:07.247287Z", "severity": "INFO", "message": "Uvicorn running on http://0.0.0.0:5000 (Press CTRL+C to quit)"} ⅹ Model setup failed
The container is being geerated for AMD64 platform, which may be the reason why it's failing ? EDIT: the docker is started, but the :5000 only serves an empty page, so it's the underlying stuff which fails...
There is no detail about why the model setup is failing, no error message. Is there a plan at Replictae to make that available for the (pretty big) Apple users community ? Thanks !
Having the same issue as @altarofwisdom on M1 Pro.
I'm also experiencing issue with M1 Pro
cog run python
Building Docker image from environment in cog.yaml...
[+] Building 1.3s (6/6) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 294B 0.0s
=> resolve image config for docker-image://docker.io/docker/dockerfile:1.4 0.9s
=> [auth] docker/dockerfile:pull token for registry-1.docker.io 0.0s
=> CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for r8.im/cog-base:python3.11 0.3s
------
> [internal] load metadata for r8.im/cog-base:python3.11:
------
Dockerfile:2
--------------------
1 | #syntax=docker/dockerfile:1.4
2 | >>> FROM r8.im/cog-base:python3.11
3 | COPY .cog/tmp/build20240901192419.804546391760398/requirements.txt /tmp/requirements.txt
4 | RUN pip install -r /tmp/requirements.txt
--------------------
ERROR: failed to solve: failed to resolve source metadata for r8.im/cog-base:python3.11: no match for platform in manifest: not found
ⅹ Failed to build Docker image: exit status 1
I've seen a few related issues and made the changes suggested therein, but still failing for me.
cog.yaml
result: