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

How to forward important arguments to pip? #3734

Closed
npielawski opened this issue May 7, 2019 · 3 comments
Closed

How to forward important arguments to pip? #3734

npielawski opened this issue May 7, 2019 · 3 comments
Labels
Type: Enhancement 💡 This is a feature or enhancement request. Type: Question ❔ This is a question or a request for support.

Comments

@npielawski
Copy link

Hello!

I am trying to use the library APEX, and I would like add --cuda_ext --cpp_ext to pip in order to install the library properly.

Is it possible to do this with pipenv? I already checked #251 and #287.

Have a nice day,
Nicolas

@jxltom jxltom added Type: Enhancement 💡 This is a feature or enhancement request. Type: Question ❔ This is a question or a request for support. labels May 9, 2019
@uranusjr
Copy link
Member

uranusjr commented May 10, 2019

How do you pass that to pip? I don’t think you can just do pip install --cuda_ext 🤔

@npielawski
Copy link
Author

Technically, I'd like to do something along the lines:
pipenv install git+https://github.com/nvidia/apex.git --cuda_ext --cpp_ext
So that under the hood, the following command is called:
pip install . --cuda_ext --cpp_ext

@techalchemy
Copy link
Member

You may be looking for the --global-option argument to pip. Per the documentation in the repository you linked, the actual pip install command would be:

$ pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .

In order to achieve this with pipenv you simply need to set the environment variable PIP_GLOBAL_OPTION="--cpp_ext --cuda_ext" and it will be passed to pip (I think). Feel free to reopen this if it fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement 💡 This is a feature or enhancement request. Type: Question ❔ This is a question or a request for support.
Projects
None yet
Development

No branches or pull requests

4 participants