pytorch/.github/requirements/README.md
Nikita Shulga 3342b533bb Update setuptool to 72.1.0 (#139144)
As older versions are affected by CVE-2024-6345

Also, update `typing_extensions` to 4.11 to support `TypeIs`, otherwise some of the workflows report following error (but succeed somehow), see [this](https://github.com/pytorch/pytorch/actions/runs/11566785190/job/32196549021):
```
2024-10-29T03:55:01.3601410Z + /Users/ec2-user/runner/_work/_temp/miniconda/bin/conda run -p /Users/ec2-user/runner/_work/_temp/conda_environment_11566785190 --no-capture-output python3 -c 'import torch'
2024-10-29T03:55:01.3602260Z ~/runner/_work/_temp ~/runner/_work/pytorch/pytorch
2024-10-29T03:55:01.8043630Z Traceback (most recent call last):
2024-10-29T03:55:01.8044540Z   File "<string>", line 1, in <module>
2024-10-29T03:55:01.8045670Z   File "/Users/ec2-user/runner/_work/_temp/conda_environment_11566785190/lib/python3.9/site-packages/torch/__init__.py", line 37, in <module>
2024-10-29T03:55:01.8046690Z     from typing_extensions import ParamSpec as _ParamSpec, TypeIs as _TypeIs
2024-10-29T03:55:01.8048010Z ImportError: cannot import name 'TypeIs' from 'typing_extensions' (/Users/ec2-user/runner/_work/_temp/conda_environment_11566785190/lib/python3.9/site-packages/typing_extensions.py)
```
Also delete macOS-X86 as we no longer build those

Pull Request resolved: https://github.com/pytorch/pytorch/pull/139144
Approved by: https://github.com/Skylion007, https://github.com/kit1980, https://github.com/huydhn
2024-10-29 04:24:51 +00:00

1.2 KiB

Cached requirements and consolidation of conda and pip installation

At the moment, the installation of conda and pip dependencies happens at different places in the CI depending at the whim of different developers, which makes it very challenging to handle issues like network flakiness or upstream dependency failures gracefully. So, this center directory is created to gradually include all the conda environment and pip requirement files that are used to setup CI jobs. Not only it gives a clear picture of all the dependencies required by different CI jobs, but it also allows them to be cached properly to improve CI reliability.

The list of support files are as follows:

  • Conda:
    • conda-env-iOS. This is used by iOS build and test jobs to setup the conda environment
    • conda-env-macOS-ARM64. This is used by MacOS (m1, arm64) build and test jobs to setup the conda environment
    • conda-env-Linux-X64. This is used by Linux buck build and test jobs to setup the conda environment
  • Pip:
    • pip-requirements-iOS.txt. This is used by iOS build and test jobs to setup the pip environment
    • pip-requirements-macOS.txt. This is used by MacOS build and test jobs to setup the pip environment