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

CLIP Install #1

Open
afiaka87 opened this issue May 4, 2021 · 3 comments
Open

CLIP Install #1

afiaka87 opened this issue May 4, 2021 · 3 comments

Comments

@afiaka87
Copy link

afiaka87 commented May 4, 2021

Have you found a way to reliably install OpenAI's CLIP via setup.py?

There's a namespace collision with another pip package which predates the OpenAI package that makes this difficult in my experience.

@afiaka87
Copy link
Author

afiaka87 commented May 4, 2021

Once we get that working - this would be a great PR to include in the larger DALLE-pytorch codebase. It is part of the original paper - after all.

@mehdidc
Copy link
Owner

mehdidc commented May 6, 2021

Hey @afiaka87, ah ok I see, did not notice for the name collision, thanks, found this https://stackoverflow.com/questions/60414753/how-to-install-githttps-from-setup-py-using-install-requires as a possible solution where we would give the repo link of CLIP directly in install_requires of setup.py, but it only works with pip install . , not python setup.py install

@afiaka87
Copy link
Author

I have one last idea, but I'm now thinking it may not work actually because it works with git clone, but not necessarily pip

cd clip_rerank;
git status # make sure you're all up to date
git submodule add https://github.com/openai/CLIP.git;
git status # should have a 'CLIP' folder now. 
git commit -am "add the OpenAI CLIP repo to the project as a submodule"
git status 
git push

Then maybe you could set an entry point located at CLIP.clip.clip (is that right?) but instead of naming it clip you just name it openai_clip. Problem solved. Except one thing. git doesn't automatically pull all submodule files down by default, you have to pass it --recurse-submodules. That means that setuptools will need to support that feature of git and I haven't checked yet it if it does. Perhaps though?

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

No branches or pull requests

2 participants