Commit 1e15fed
authored
ci: Install CUDA version specified torch first during container building. (#2167)
<!-- .github/pull_request_template.md -->
## 📌 Description
In the existing `install_python_packages.sh`, we install requirements in
requirements.txt first followed by a torch installation with cuda
version specified.
This means `pip install torch` is done with no CUDA version specified.
The result is [this
example](https://github.com/flashinfer-ai/flashinfer/actions/runs/19879133946/job/56973105583#step:6:413)
where cu12 dependencies are installed. Then, torch cu130 is installed,
which updates the torch itself, but not the dependencies, resulting in
duplicated torch dependencies -- in cu12 and cu13.
Current PR moves the torch installation earlier so that the torch
requirement in requirements.txt is already satisfied. Resultant
pipeline:
* [torch cu13 installs first, with cu13
dependencies](https://github.com/flashinfer-ai/flashinfer/actions/runs/19905525901/job/57060644811?pr=2167#step:6:332)
* Then the [torch in requirements.txt is
skipped](https://github.com/flashinfer-ai/flashinfer/actions/runs/19905525901/job/57060644811?pr=2167#step:6:475)
<!-- What does this PR do? Briefly describe the changes and why they’re
needed. -->
## 🔍 Related Issues
<!-- Link any related issues here -->
## 🚀 Pull Request Checklist
Thank you for contributing to FlashInfer! Before we review your pull
request, please make sure the following items are complete.
### ✅ Pre-commit Checks
- [x] I have installed `pre-commit` by running `pip install pre-commit`
(or used your preferred method).
- [x] I have installed the hooks with `pre-commit install`.
- [x] I have run the hooks manually with `pre-commit run --all-files`
and fixed any reported issues.
> If you are unsure about how to set up `pre-commit`, see [the
pre-commit documentation](https://pre-commit.com/).
## 🧪 Tests
- [x] Tests have been added or updated as needed.
- [x] All tests are passing (`unittest`, etc.).
## Reviewer Notes
<!-- Optional: anything you'd like reviewers to focus on, concerns, etc.
-->1 parent 442dec9 commit 1e15fed
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
0 commit comments