Skip to content

Fix 2129 - CUDA required dependencies #2131

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

Closed
wants to merge 17 commits into from

Conversation

bhashemian
Copy link
Member

@bhashemian bhashemian commented May 3, 2021

related to #2129

Description

This PR adds cupy dependency (which requires CUDA), and modifies CI/CD workflow to exclude the dependencies that requires CUDA for non-CUDA instances with full dependency installation (quick-py3).

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@bhashemian bhashemian requested a review from wyli May 3, 2021 16:26
@bhashemian bhashemian removed the request for review from wyli May 3, 2021 17:18
@bhashemian
Copy link
Member Author

I am adding the CUDA version specific binaries.

@wyli
Copy link
Contributor

wyli commented May 3, 2021

the installation is not straightforward here... How would a pip install user get this cupy feature?

@bhashemian
Copy link
Member Author

the installation is not straightforward here... How would a pip install user get this cupy feature?

@wyli
A user can simply install it from source by pip install cupy==9.0.0, which is part of requirements-dev.txt. If it's preferred, I can leave it to be the same for our CI/CD workflow. The reason that I wanted to use CUDA-version-specific binaries is to speed up the workflow. Does it make sense?

@wyli
Copy link
Contributor

wyli commented May 3, 2021

the installation is not straightforward here... How would a pip install user get this cupy feature?

@wyli
A user can simply install it from source by pip install cupy==9.0.0, which is part of requirements-dev.txt. If it's preferred, I can leave it to be the same for our CI/CD workflow. The reason that I wanted to use CUDA-version-specific binaries is to speed up the workflow. Does it make sense?

thanks, it makes sense. is it possible to skip the requirement based on system info, such as:

cucim~=0.19.0; platform_system == "Linux"

otherwise this requirements file always requires Cuda... it's too restrictive. another option is to have requirements-dev-cpu.txt and requirements-dev.txt? cc @rijobro @ericspod

@bhashemian
Copy link
Member Author

the installation is not straightforward here... How would a pip install user get this cupy feature?

@wyli
A user can simply install it from source by pip install cupy==9.0.0, which is part of requirements-dev.txt. If it's preferred, I can leave it to be the same for our CI/CD workflow. The reason that I wanted to use CUDA-version-specific binaries is to speed up the workflow. Does it make sense?

thanks, it makes sense. is it possible to skip the requirement based on system info, such as:

cucim~=0.19.0; platform_system == "Linux"

otherwise this requirements file always requires Cuda... it's too restrictive. another option is to have requirements-dev-cpu.txt and requirements-dev.txt? cc @rijobro @ericspod

Here the condition is based on GPU availability and CUDA version and I haven't seen any environment marker that identifies that. Do you know any?

I like the idea of having cpu and gpu-specific requirements.

@bhashemian
Copy link
Member Author

@rijobro @ericspod @wyli
There are two other PR's that depends on the decision here to move forward. Can we agree on an interim solution to proceed? Thanks.

@bhashemian bhashemian requested a review from wyli May 3, 2021 21:44
@bhashemian bhashemian requested a review from rijobro May 4, 2021 13:54
@bhashemian bhashemian enabled auto-merge (squash) May 4, 2021 13:54
@bhashemian
Copy link
Member Author

@wyli would it be fine to move forward with this?

@wyli
Copy link
Contributor

wyli commented May 4, 2021

no sure what the best way forward is, how about we keep the original requirements-dev.txt, and only change the CI/CD yml, so that we get the basic CI/CD for the cupy related?

@rijobro
Copy link
Contributor

rijobro commented May 4, 2021

We have requirements.txt, requirements-min.txt, requirements-dev.txt. Should we introduce a requirements-cuda.txt? It would be cleaner to include a file when needed rather than remove individual packages when not needed.

@wyli
Copy link
Contributor

wyli commented May 4, 2021

I feel this needs more discussions -- we also have docs/requirements.txt, and there are some requirements only for type hints/code formatting. perhaps we should have a requirements folder and with all the different files

@ericspod
Copy link
Member

ericspod commented May 4, 2021

We can hotfix the CI/CD yaml files for now and come back to what to do about the requirements files. It's getting out of hand to have multiple files for different configurations, users won't find it obvious what they need to install. Perhaps there's a more involved requirements management process we can use, maybe something like poetry?

@rijobro
Copy link
Contributor

rijobro commented May 5, 2021

We could also have a script that will call the relevant requirement files? You know, like ./install_dependencies.py --cuda or ./install_dependencies.py --min.

@wyli
Copy link
Contributor

wyli commented May 12, 2021

Hi @behxyz We discussed this issue on Friday, the conclusion is to keep the requirements-*.txt unchanged for now, we'll go through the other OSS to find a good solution for the deps.

@wyli
Copy link
Contributor

wyli commented Aug 27, 2021

closing this in favour of #2858 #2849

@wyli wyli closed this Aug 27, 2021
auto-merge was automatically disabled August 27, 2021 09:52

Pull request was closed

@bhashemian bhashemian deleted the cuda_required_dep branch November 23, 2021 23:52
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.

4 participants