Fix flash-attn Docker build broken by setuptools 83 removing pkg_resources (#47251)
* Fix flash-attn build failure caused by setuptools>=83 removing pkg_resources
torch 2.13.0 (released 2026-07-08) added an unconditional setuptools>=77.0.3
requirement. pip resolves this to setuptools 83.0.0, which removed pkg_resources.
The Ubuntu 22.04 system wheel (used during --no-build-isolation builds) still
imports pkg_resources, causing flash-attn to fail to build.
Fix: upgrade wheel to >=0.43 (which uses importlib.metadata instead) right
before flash-attn is installed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add context comment for wheel upgrade before flash-attn
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* build
* check run
* Use if/else for flash-attn install to fail loudly on real errors
The old `... || echo` pattern silently swallowed all install failures
(including the setuptools/pkg_resources issue), causing the image to be
pushed without flash-attn installed. Use if/else to only skip gracefully
for the two expected cases (FLASH_ATTN=false, nightly torch), and let
any actual install failure correctly break the Docker build.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Simplify flash-attn condition back to single FLASH_ATTN check
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix comment to reflect single FLASH_ATTN condition
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* check run
* Revert workflow/utils changes unrelated to flash-attn fix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>