fix: update CLIP module path to match correct Python version (3.10.15) #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 incog.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
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
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.