mammoth-queen-9523
07/07/2022, 2:09 PMdocker_image with pex_binary on M1 .
docker image created but when i try to run it i get
Failed to find compatible interpreter on path /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin.
Examined the following interpreters:
1.) /usr/local/bin/python3.9 CPython==3.9.13
No interpreter compatible with the requested constraints was found:
A distribution for pandas could not be resolved for /usr/local/bin/python3.9.
Found 1 distribution for pandas that do not apply:
1.) The wheel tags for pandas 1.4.3 are cp39-cp39-macosx_11_0_arm64 which do not match the supported tags of /usr/local/bin/python3.9:
cp39-cp39-manylinux_2_31_aarch64
... 367 more ...
As I understand pex and docker image was built for different architectures. How can I solve it?enough-analyst-54434
07/07/2022, 2:13 PMenough-analyst-54434
07/07/2022, 2:16 PMmammoth-queen-9523
07/07/2022, 2:29 PMcomplete_platforms or platforms?
I have tried to set pex_bynary.platforms
pex_binary(
name="bin",
entry_point="...",
output_path="...",
platforms=[
"manylinux_2_31_aarch64-cp-39-cp39",
]
)
and got
./pants package ::
17:26:45.55 [INFO] Completed: Building etl_cloudtrail_events_to_snowflake/bin.pex with 4 requirements: marshmallow-dataclass<9.0.0,>=8.5.8, nest-asyncio<2.0.0,>=1.5.5, orca-infra==1.12.0.dev2624633449, pandas<2.0.0,>=1.4.3
17:26:45.55 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building etl_cloudtrail_events_to_snowflake/bin.pex with 4 requirements: marshmallow-dataclass<9.0.0,>=8.5.8, nest-asyncio<2.0.0,>=1.5.5, orca-infra==1.12.0.dev2624633449, pandas<2.0.0,>=1.4.3' failed with exit code 1.
stdout:
stderr:
ERROR: Could not find a version that satisfies the requirement pandas<2.0.0,>=1.4.3
ERROR: No matching distribution found for pandas<2.0.0,>=1.4.3
not exactly understand what should I set and whereenough-analyst-54434
07/07/2022, 2:35 PMs/manylinux/linux/ , then Pants defaults will do the right thing here and default you to manylinux2014 compatibility, for which there is a wheel.enough-analyst-54434
07/07/2022, 2:37 PMs/manylinux_2_31/linux/enough-analyst-54434
07/07/2022, 2:41 PMmammoth-queen-9523
07/07/2022, 2:56 PMlinux_aarch64-cp-39-cp39 as platform?
got long error with
Failed to resolve for platform linux_aarch64-cp-39-cp39. Resolve requires evaluation of unknown environment marker: 'python_full_version' does not exist in evaluation environment.enough-analyst-54434
07/07/2022, 3:07 PMcp-39-cp39 portion to cp-3.9.x-cp39 where x you need to find out from the interpreter in your container. See the PYVER note in https://www.pantsbuild.org/docs/reference-pex_binary#codeplatformscodemammoth-queen-9523
07/10/2022, 2:45 PMdist package. And as I understand pants can’t build it locally for another architecture.
Tried to run pants package in docker container so that both pex and docker image will be created for same arch, but there is no pantsbuild.pants whl package for linux on arm64.
Bootstrapping Pants using /usr/local/bin/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.62/pex> verified.
Installing pantsbuild.pants==2.12.0 into a virtual environment at /root/.cache/pants/setup/bootstrap-Linux-aarch64/2.12.0_py39
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.12.0 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0)
ERROR: No matching distribution found for pantsbuild.pants==2.12.0
Is it possible to distribute the package also for linux arm64?enough-analyst-54434
07/10/2022, 3:00 PMenough-analyst-54434
07/10/2022, 5:46 PMrelease_X.Y.Z) and ./build-support/bin/release.sh build-wheels. You'd then have to make those wheels available on some corporate server and likely have to alter the ./pants script slightly to see that server in addition to PyPI.enough-analyst-54434
07/10/2022, 5:47 PMenough-analyst-54434
07/10/2022, 5:48 PMrhythmic-morning-87313
07/11/2022, 1:18 AMrhythmic-morning-87313
07/11/2022, 1:19 AMrhythmic-morning-87313
07/11/2022, 1:19 AMenough-analyst-54434
07/11/2022, 2:05 AM