Skip to content

Conversation

@Adi0987
Copy link
Contributor

@Adi0987 Adi0987 commented Nov 20, 2025

Adds support for multiple ARM64 manylinux platforms to improve wheel compatibility when packaging dependencies for AgentCore Runtime.

Changes

  • Support multiple manylinux platforms: aarch64-manylinux2014, aarch64-manylinux_2_17, aarch64-manylinux_2_28
  • Try platforms in order of preference for better wheel compatibility
  • Fallback to next platform if current one fails to find compatible wheels

Benefits

  • Improved compatibility with packages that only have wheels for newer manylinux standards
  • Better success rate for dependency installation in AgentCore Runtime
  • Maintains backward compatibility with existing aarch64-manylinux2014 base

@Adi0987 Adi0987 force-pushed the feat/multi-platform-arm64-support branch from a006067 to ec0b7ea Compare November 20, 2025 19:21
@Adi0987 Adi0987 force-pushed the feat/multi-platform-arm64-support branch from ec0b7ea to 8d6009d Compare November 20, 2025 19:26
@Adi0987 Adi0987 force-pushed the feat/multi-platform-arm64-support branch from 8d6009d to 722d07f Compare November 20, 2025 19:27
platforms = ["aarch64-manylinux2014", "aarch64-manylinux_2_17", "aarch64-manylinux_2_28"]

for i, platform in enumerate(platforms):
cmd = self._build_uv_command(requirements_file, target_dir, python_version, platform)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we running the compile for each platform seperately. Can we not do it together all at once like we do in pip?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately uv does not give option to have multiple python platform args with fallback
astral-sh/uv#3333

log.info("✓ Dependencies installed with uv")
except subprocess.CalledProcessError as e:
raise RuntimeError(f"Failed to install dependencies with uv: {e.stderr}") from e
if cross_compile:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this flag is in the method by default, in case we want to add local compilation in the future.

Right now this flag always returns true (utility method)

def _build_uv_command(self, requirements: Path, target: Path, py_version: str, cross: bool) -> List[str]:
try:
subprocess.run(cmd, check=True, capture_output=True, text=True) # nosec B603 - using uv command
if i == 0:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not understand this part, why are we checking like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be fixed. Will address

@Adi0987 Adi0987 force-pushed the feat/multi-platform-arm64-support branch from 722d07f to 588125b Compare November 20, 2025 20:48
@siwachabhi
Copy link
Contributor

Do we install multiple binaries with this approach, or just one of the available ones?

@Adi0987
Copy link
Contributor Author

Adi0987 commented Nov 20, 2025

So uv pip install resolves the dependencies, then actually installs them. The resolution fails fast. So this installs a single binary for the dependencies for the first python platform that is matched

@siwachabhi siwachabhi requested a review from eshadutta November 21, 2025 20:01
- Support multiple manylinux platforms: aarch64-manylinux2014, aarch64-manylinux_2_17, aarch64-manylinux_2_28
- Try platforms in order of preference for better wheel compatibility
- Fallback to next platform if current one fails to find compatible wheels
@Adi0987 Adi0987 force-pushed the feat/multi-platform-arm64-support branch from 588125b to b02a271 Compare November 21, 2025 21:02
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.

3 participants