You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal is to support building OCI (docker) images for a platform other than the host platform.
For reasons related to our tooling (we use Bazel and want hermetic builds), we do not want to do this via running pip install commands on the image itself (as would be normal in a Dockerfile).
The solution we have now is to download wheels for different platforms using pip download --platform. We can then pass the appropriate target depending on which platform we are building for. This method has the downside that we need appropriate wheels to exist for the packages we want to use (this sometimes involves creating our own).
Is there any way to achieve my goal with uv? Support for uv pip download --platform would be sufficient, but it would be ideal to be able to not need the wheels. uv pip install --platform or similar would be even better (no idea if this is at all feasible).
The text was updated successfully, but these errors were encountered:
I would definitely use uv pip install --platform if implemented! My current use case involves downloading python dependencies with pip install -r requirements.txt --platform manylinux2014_aarch64.
These deps are then zipped and uploaded to AWS as a lambda layer. The lambdas using the layer run on the AWS managed Python 3.11 runtime with ARM architecture.
One of my dependencies is lxml which is what required me to add the --platform manylinux2014_aarch64 option initially.
I'm a big fan of Ruff, so I'm hoping I can start to make use of uv more too.
## Summary
pip supports providing a `--platform` to `pip install`, which can be
used to seed an environment (e.g., for use in a container or otherwise).
This PR adds `--python-platform` to our commands to support a similar
workflow. It has some caveats, which are documented on the CLI.
Closes#2079.
My goal is to support building OCI (docker) images for a platform other than the host platform.
For reasons related to our tooling (we use Bazel and want hermetic builds), we do not want to do this via running
pip install
commands on the image itself (as would be normal in a Dockerfile).The solution we have now is to download wheels for different platforms using
pip download --platform
. We can then pass the appropriate target depending on which platform we are building for. This method has the downside that we need appropriate wheels to exist for the packages we want to use (this sometimes involves creating our own).Is there any way to achieve my goal with uv? Support for
uv pip download --platform
would be sufficient, but it would be ideal to be able to not need the wheels.uv pip install --platform
or similar would be even better (no idea if this is at all feasible).The text was updated successfully, but these errors were encountered: