Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update CLIP module path to match correct Python version (3.10.15) #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

isiahw1
Copy link

@isiahw1 isiahw1 commented Nov 25, 2024

Bug Fix: CLIP Module Path Update

Fixes #56

Issue

The Docker build was failing with the following error:
sed: can't read /root/.pyenv/versions/3.10.4/lib/python3.10/site-packages/clip/clip.py: No such file or directory

This occurred because the sed command in cog.yaml was trying to modify the CLIP module in Python 3.10.4's site-packages directory, but the module was actually installed under Python 3.10.15 despite the python version being specified as 3.10.4 in cog.yaml.

Changes

  • Updated the Python path in the sed command from:

- sed -i 's/from pkg_resources import packaging/import packaging/g' /root/.pyenv/versions/3.10.4/lib/python3.10/site-packages/clip/clip.py

to:

- sed -i 's/from pkg_resources import packaging/import packaging/g' /root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/clip/clip.py

Testing

  • Verified that the Docker build completes successfully with the new path
  • Confirmed that the CLIP module is properly patched and loads without errors
  • Tested with cog predict command which now executes without the previous error

Additional Notes

The discrepancy between the Python versions (3.10.4 vs 3.10.15) appears to be due to the actual installation path differing from the version specified in python_version. This fix aligns the path with the actual installation location.

The sed command was failing because it was looking for the CLIP module in Python 3.10.4's site-packages, but the actual installation is in 3.10.15. Updated the path to fix the Docker build error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

May I ask if someone has successfully deployed it locally?
1 participant