replicate / cog

Containers for machine learning
https://cog.run
Apache License 2.0
8k stars 559 forks source link

I've tried a lot of solutions but i don't know if that's right. #500

Open qiao-lang1997 opened 2 years ago

qiao-lang1997 commented 2 years ago

I am a newbie. I can't run the code from CLIP_prefix_caption. Hope to get your help, thank you. image

zeke commented 2 years ago

Hi @qiao-lang1997, sorry to hear you're having trouble.

Can you try running that command with the --debug flag and share the output you're seeing?

sudo cog --debug predict -i image ...

(Tip for next time: Pasting the raw text of the output may be useful than a screenshot because it's searchable.)

qiao-lang1997 commented 2 years ago

Seems to be a download failure.

(base) vipuser@ubuntu1804:~/project/CLIP_prefix_caption$ sudo cog --debug predict -i image=@input.jpg ⚠ Cog doesn't know if CUDA 10.2 is compatible with PyTorch 1.9.1. This might cause CUDA problems. Setting CuDNN to version 10.2 Building Docker image from environment in cog.yaml... $ docker build --file - --build-arg BUILDKIT_INLINE_CACHE=1 --tag cog-clipprefixcaption-base --progress auto . [+] Building 9.2s (9/14) => [internal] load build definition from Dockerfile 0.2s => => transferring dockerfile: 1.59kB 0.0s => [internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => resolve image config for docker.io/docker/dockerfile:1.2 2.4s => CACHED docker-image://docker.io/docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313 0.0s => [internal] load metadata for docker.io/nvidia/cuda:10.2-cudnn8-devel-ubuntu18.04 1.6s => [internal] load build context 0.5s => => transferring context: 25.60kB 0.0s => [stage-0 1/8] FROM docker.io/nvidia/cuda:10.2-cudnn8-devel-ubuntu18.04@sha256:61f4c02abaaa2470ab2af28f0bf4b46 0.0s => CACHED [stage-0 2/8] RUN --mount=type=cache,target=/var/cache/apt apt-get update -qq && apt-get install -qqy 0.0s => ERROR [stage-0 3/8] RUN curl https://pyenv.run | bash && git clone https://github.com/momo-lab/pyenv-install 4.1s

[stage-0 3/8] RUN curl https://pyenv.run | bash && git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest && pyenv install-latest "3.8" && pyenv global $(pyenv install-latest --print "3.8") && pip install "wheel<1":

8 1.009 % Total % Received % Xferd Average Speed Time Time Time Current

8 1.009 Dload Upload Total Spent Left Speed

100 270 100 270 0 0 237 0 0:00:01 0:00:01 --:--:-- 237

8 2.417 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443

8 2.421 /bin/sh: 1: pyenv: not found

8 2.424 Cloning into '/plugins/pyenv-install-latest'...

8 3.772 /bin/sh: 1: pyenv: not found


executor failed running [/bin/sh -c curl https://pyenv.run | bash && git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest && pyenv install-latest "3.8" && pyenv global $(pyenv install-latest --print "3.8") && pip install "wheel<1"]: exit code: 127 ⅹ Failed to build Docker image: exit status 1

qiao-lang1997 commented 2 years ago

cog.yaml

image: r8.im/rmokady/clip_prefix_caption

build: gpu: true cuda: "10.2"

system_packages:

predict: "predict.py:Predictor"