cog icon indicating copy to clipboard operation
cog copied to clipboard

cog build error on Mac

Open slowbee0 opened this issue 1 year ago • 1 comments

hello,

I test the example repository bellow: https://github.com/andreasjansson/cog-qrcode https://replicate.com/andreasjansson/illusion

platform: Mac cog version 0.9.4 (built 2024-01-25T00:45:54+0000) gpu: true

but build failed

cog build -t test_cog

error log

Building Docker image from environment in cog.yaml as test_cog...
[+] Building 892.2s (18/22)                                docker:desktop-linux
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 2.08kB                                     0.0s
 => resolve image config for docker.io/docker/dockerfile:1.4               4.7s
 => [auth] docker/dockerfile:pull token for registry-1.docker.io           0.0s
 => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531b  0.0s
 => [internal] load metadata for docker.io/nvidia/cuda:11.8.0-cudnn8-deve  5.8s
 => [internal] load metadata for docker.io/library/python:3.10             4.9s
 => [auth] library/python:pull token for registry-1.docker.io              0.0s
 => [auth] nvidia/cuda:pull token for registry-1.docker.io                 0.0s
 => [internal] load build context                                          0.9s
 => => transferring context: 151.26MB                                      0.9s
 => [deps 1/5] FROM docker.io/library/python:3.10@sha256:11edd7f5ed19b19a  0.0s
 => [stage-1 1/7] FROM docker.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22  0.3s
 => => resolve docker.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04@sha2  0.0s
 => => sha256:bd746eb3b9953805ebe644847a227e218b5da775f47 2.84kB / 2.84kB  0.0s
 => => sha256:8f9dd0d09d3ad3900357a1cf7f887888b5b74056636cd6e 743B / 743B  0.0s
 => => sha256:d0117ee15b5fd0bbcb42c8fd3e35f9bc0f06fe3a9 17.79kB / 17.79kB  0.0s
 => [stage-1 2/7] RUN --mount=type=cache,target=/var/cache/apt set -eux  212.9s
 => CACHED [deps 2/5] COPY .cog/tmp/build811646650/cog-0.0.1.dev-py3-none  0.0s
 => CACHED [deps 3/5] RUN --mount=type=cache,target=/root/.cache/pip pip   0.0s
 => CACHED [deps 4/5] COPY .cog/tmp/build811646650/requirements.txt /tmp/  0.0s
 => ERROR [deps 5/5] RUN --mount=type=cache,target=/root/.cache/pip pip  880.3s
 => CANCELED [stage-1 3/7] RUN --mount=type=cache,target=/var/cache/apt  668.3s
------
 > [deps 5/5] RUN --mount=type=cache,target=/root/.cache/pip pip install -t /dep -r /tmp/requirements.txt:
2.058 Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
4.432 Collecting diffusers==0.21.1
4.447   Using cached diffusers-0.21.1.tar.gz (1.1 MB)
5.117   Installing build dependencies: started
18.65   Installing build dependencies: finished with status 'done'
18.66   Getting requirements to build wheel: started
19.88   Getting requirements to build wheel: finished with status 'done'
19.89   Preparing metadata (pyproject.toml): started
21.17   Preparing metadata (pyproject.toml): finished with status 'done'
23.63 Collecting torch==2.0.1
23.94   Downloading https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-linux_x86_64.whl (2267.3 MB)
814.6      ━━━━━━━━━━━━━━━━━━━━━                    1.2/2.3 GB 1.0 MB/s eta 0:17:19
879.7 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
879.7     torch==2.0.1 from https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-linux_x86_64.whl#sha256=a7a49d459bf4862f64f7bc1a68beccf8881c2fa9f3e0569608e16ba6f85ebf7b (from -r /tmp/requirements.txt (line 3)):
879.7         Expected sha256 a7a49d459bf4862f64f7bc1a68beccf8881c2fa9f3e0569608e16ba6f85ebf7b
879.7              Got        10b0e2ca39efff9b636b2a711a0ec9d12109ba3c8169a24d4334a1537edd1df1
879.7
879.7
879.7 [notice] A new release of pip is available: 23.0.1 -> 23.3.2
879.7 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:6
--------------------
   4 |     RUN --mount=type=cache,target=/root/.cache/pip pip install -t /dep /tmp/cog-0.0.1.dev-py3-none-any.whl
   5 |     COPY .cog/tmp/build811646650/requirements.txt /tmp/requirements.txt
   6 | >>> RUN --mount=type=cache,target=/root/.cache/pip pip install -t /dep -r /tmp/requirements.txt
   7 |     FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
   8 |     ENV DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -t /dep -r /tmp/requirements.txt" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/yoyytaq146s5zyblcj84h9teo
ⅹ Failed to build Docker image: exit status 1

I need some help, thanks!

slowbee0 avatar Jan 29 '24 00:01 slowbee0

need PROXY in China?

slowbee0 avatar Jan 29 '24 00:01 slowbee0

This is made to run on CUDA. Mac is still in the works

lucataco avatar Mar 02 '24 19:03 lucataco