pharmapsychotic / clip-interrogator

Image to prompt with BLIP and CLIP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem in building COG model

amanjain1397appy opened this issue · comments

Hi,

I am trying to build the image using cog, and using the following snippet to build it.

cog build -t clip-interrogator

However I am getting dependency conflict issues while installing the requirements.txt file. I am attaching the error traceback below.

 => ERROR [stage-0 10/12] RUN --mount=type=cache,target=/root/.cache/pip pip install -r /tmp/requ  37.2s
------
 > [stage-0 10/12] RUN --mount=type=cache,target=/root/.cache/pip pip install -r /tmp/requirements.txt:
#16 1.105 Collecting git+https://github.com/pharmapsychotic/BLIP.git (from -r /tmp/requirements.txt (line 10))
#16 1.106   Cloning https://github.com/pharmapsychotic/BLIP.git to /tmp/pip-req-build-pl0jvldy
#16 1.112   Running command git clone --filter=blob:none --quiet https://github.com/pharmapsychotic/BLIP.git /tmp/pip-req-build-pl0jvldy
#16 3.047   Resolved https://github.com/pharmapsychotic/BLIP.git to commit f261f5e5782df9c98aedf01166b2b56fbb5c237f
#16 3.258   Installing build dependencies: started
#16 6.334   Installing build dependencies: finished with status 'done'
#16 6.339   Getting requirements to build wheel: started
#16 6.595   Getting requirements to build wheel: finished with status 'done'
#16 6.786   Installing backend dependencies: started
#16 9.054   Installing backend dependencies: finished with status 'done'
#16 9.058   Preparing metadata (pyproject.toml): started
#16 9.281   Preparing metadata (pyproject.toml): finished with status 'done'
#16 9.414 Collecting ipython==8.4.0
#16 9.418   Using cached ipython-8.4.0-py3-none-any.whl (750 kB)
#16 9.450 Collecting fairscale==0.4.12
#16 9.453   Using cached fairscale-0.4.12.tar.gz (255 kB)
#16 9.690   Installing build dependencies: started
#16 12.87   Installing build dependencies: finished with status 'done'
#16 12.88   Getting requirements to build wheel: started
#16 13.05   Getting requirements to build wheel: finished with status 'done'
#16 13.23   Installing backend dependencies: started
#16 15.56   Installing backend dependencies: finished with status 'done'
#16 15.56   Preparing metadata (pyproject.toml): started
#16 15.79   Preparing metadata (pyproject.toml): finished with status 'done'
#16 15.88 Collecting transformers==4.21.2
#16 15.89   Using cached transformers-4.21.2-py3-none-any.whl (4.7 MB)
#16 15.94 Collecting ftfy==6.1.1
#16 15.95   Using cached ftfy-6.1.1-py3-none-any.whl (53 kB)
#16 16.04 Collecting torch==1.13.0
#16 17.64   Using cached torch-1.13.0-cp38-cp38-manylinux1_x86_64.whl (890.2 MB)
#16 20.37 Collecting torchvision==0.14.0
#16 20.44   Using cached torchvision-0.14.0-cp38-cp38-manylinux1_x86_64.whl (24.3 MB)
#16 20.56 Collecting open_clip_torch==2.7.0
#16 20.57   Using cached open_clip_torch-2.7.0-py3-none-any.whl (1.4 MB)
#16 20.63 Collecting timm==0.4.12
#16 20.63   Using cached timm-0.4.12-py3-none-any.whl (376 kB)
#16 20.67 Collecting pycocoevalcap==1.2
#16 20.91   Using cached pycocoevalcap-1.2-py3-none-any.whl (104.3 MB)
#16 21.31 Collecting pickleshare
#16 21.31   Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
#16 21.32 Requirement already satisfied: setuptools>=18.5 in /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages (from ipython==8.4.0->-r /tmp/requirements.txt (line 1)) (56.0.0)
#16 21.35 Collecting stack-data
#16 21.35   Using cached stack_data-0.6.2-py3-none-any.whl (24 kB)
#16 21.46 Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
#16 21.47   Using cached prompt_toolkit-3.0.38-py3-none-any.whl (385 kB)
#16 21.53 Collecting pygments>=2.4.0
#16 21.53   Using cached Pygments-2.15.1-py3-none-any.whl (1.1 MB)
#16 21.56 Collecting pexpect>4.3
#16 21.57   Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
#16 21.61 Collecting jedi>=0.16
#16 21.61   Using cached jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
#16 21.67 Collecting decorator
#16 21.67   Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
#16 21.69 Collecting backcall
#16 21.70   Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
#16 21.76 Collecting traitlets>=5
#16 21.76   Using cached traitlets-5.9.0-py3-none-any.whl (117 kB)
#16 21.79 Collecting matplotlib-inline
#16 21.79   Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
#16 22.25 Collecting numpy>=1.22.0
#16 22.28   Using cached numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
#16 23.79 Collecting regex!=2019.12.17
#16 23.80   Using cached regex-2023.3.23-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (771 kB)
#16 23.93 Collecting tqdm>=4.27
#16 23.93   Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
#16 24.00 Collecting huggingface-hub<1.0,>=0.1.0
#16 24.00   Using cached huggingface_hub-0.13.4-py3-none-any.whl (200 kB)
#16 24.04 Collecting filelock
#16 24.04   Using cached filelock-3.12.0-py3-none-any.whl (10 kB)
#16 24.05 Requirement already satisfied: requests in /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages (from transformers==4.21.2->-r /tmp/requirements.txt (line 3)) (2.28.2)
#16 24.09 Collecting packaging>=20.0
#16 24.09   Using cached packaging-23.1-py3-none-any.whl (48 kB)
#16 24.42 Collecting tokenizers!=0.11.3,<0.13,>=0.11.1
#16 24.43   Using cached tokenizers-0.12.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.6 MB)
#16 24.45 Requirement already satisfied: pyyaml>=5.1 in /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages (from transformers==4.21.2->-r /tmp/requirements.txt (line 3)) (6.0)
#16 24.48 Collecting wcwidth>=0.2.5
#16 24.48   Using cached wcwidth-0.2.6-py2.py3-none-any.whl (29 kB)
#16 24.51 Collecting nvidia-cuda-nvrtc-cu11==11.7.99
#16 24.54   Using cached nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)
#16 24.62 Collecting nvidia-cudnn-cu11==8.5.0.96
#16 25.60   Using cached nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)
#16 27.15 Collecting nvidia-cuda-runtime-cu11==11.7.99
#16 27.15   Using cached nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)
#16 27.18 Collecting nvidia-cublas-cu11==11.10.3.66
#16 27.74   Using cached nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)
#16 28.59 Requirement already satisfied: typing-extensions in /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages (from torch==1.13.0->-r /tmp/requirements.txt (line 5)) (4.5.0)
#16 29.08 Collecting pillow!=8.3.*,>=5.3.0
#16 29.09   Using cached Pillow-9.5.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.4 MB)
#16 29.15 Collecting pycocotools>=2.0.2
#16 29.15   Using cached pycocotools-2.0.6.tar.gz (24 kB)
#16 29.33   Installing build dependencies: started
#16 35.81   Installing build dependencies: finished with status 'done'
#16 35.81   Getting requirements to build wheel: started
#16 36.29   Getting requirements to build wheel: finished with status 'done'
#16 36.29   Preparing metadata (pyproject.toml): started
#16 36.69   Preparing metadata (pyproject.toml): finished with status 'done'
#16 36.69 Requirement already satisfied: wheel in /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch==1.13.0->-r /tmp/requirements.txt (line 5)) (0.40.0)
#16 36.71 INFO: pip is looking at multiple versions of nvidia-cudnn-cu11 to determine which version is compatible with other requirements. This could take a while.
#16 36.71 INFO: pip is looking at multiple versions of nvidia-cuda-runtime-cu11 to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of nvidia-cuda-nvrtc-cu11 to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of nvidia-cublas-cu11 to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of pycocoevalcap to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of timm to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of open-clip-torch to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of torch to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of ftfy to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of transformers to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of fairscale to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
#16 36.72 INFO: pip is looking at multiple versions of ipython to determine which version is compatible with other requirements. This could take a while.
#16 36.72 ERROR: Cannot install -r /tmp/requirements.txt (line 10) and fairscale==0.4.12 because these package versions have conflicting dependencies.
#16 36.72 
#16 36.72 The conflict is caused by:
#16 36.72     The user requested fairscale==0.4.12
#16 36.72     blip-ci 0.0.2 depends on fairscale==0.4.4
#16 36.72 
#16 36.72 To fix this you could try to:
#16 36.72 1. loosen the range of package versions you've specified
#16 36.72 2. remove package versions to allow pip attempt to solve the dependency conflict
#16 36.72 
#16 36.72 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
#16 36.73 WARNING: You are using pip version 22.0.4; however, version 23.1 is available.
#16 36.73 You should consider upgrading via the '/root/.pyenv/versions/3.8.16/bin/python3.8 -m pip install --upgrade pip' command.
------
executor failed running [/bin/sh -c pip install -r /tmp/requirements.txt]: exit code: 1
ⅹ Failed to build Docker image: exit status 1

Can you please help out with this?

hmm I haven't touched the cog in forever, let me give it a try and see

I've updated the cog now and deployed latest version to replicate :)