Error during `cog build`, `"/.cog/openapi_schema.json": not found`
When running cog build, encounter error while naming to docker.io/....
The error appears to originate from a file /.cog/openapi_schema.json not found, yet this file is present in the local directory at that location.
=> CACHED [stage-0 18/19] WORKDIR /src 0.0s
=> CACHED [stage-0 19/19] COPY . /src 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => preparing layers for inline cache 0.0s
=> => writing image sha256:9a73f3a26a8f5ebaabb6dcef3e586ab0007f812f357f51266ac2e54b3b1ac5b4 0.0s
=> => naming to docker.io/library/cog-stable-audio-fine-tune 0.0s
Validating model schema...
Adding labels to image...
Unable to determine Git tag
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 104B done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/library/cog-stable-audio-fine-tune:latest
#2 DONE 0.0s
#3 [internal] load .dockerignore
#3 transferring context: 99B done
#3 DONE 0.0s
#4 [1/2] FROM docker.io/library/cog-stable-audio-fine-tune:latest
#4 CACHED
#5 [internal] load build context
#5 transferring context: 2B done
#5 DONE 0.0s
#6 [2/2] COPY .cog/openapi_schema.json .cog
#6 ERROR: failed to calculate checksum of ref a2a53241-307d-42c4-bcf0-270175a6d704::caei4xk7dbgjs3fze32f302r1: "/.cog/openapi_schema.json": not found
------
> [2/2] COPY .cog/openapi_schema.json .cog:
------
Dockerfile:2
--------------------
1 | FROM cog-stable-audio-fine-tune
2 | >>> COPY .cog/openapi_schema.json .cog
3 |
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref a2a53241-307d-42c4-bcf0-270175a6d704::caei4xk7dbgjs3fze32f302r1: "/.cog/openapi_schema.json": not found
ⅹ Failed to add labels to image: exit status 1
May be related to https://github.com/replicate/cog/issues/1723, but after running
docker buildx ls
docker buildx inspect
docker buildx use default
as described in as suggested (here too: https://github.com/replicate/cog/issues/1718), error still thrown.
Hi @javanasse. Sorry this isn't working for you. What version of Cog are you using? Can you reproduce this with the latest version? (v0.9.13)?
@mattt Yes for me it still reproduces with latest build