Solution
The following uses mlpy_env.zip as an example. You can change the file name based on the site requirements.
Pack both x86 and Arm versions of Python into a single Python archive, mlpy_env.zip. The x86 directory is named mlpy_env, matching the archive name. The Arm directory is named mlpy_env_aarch64, which is the archive name plus _aarch64.
1 2 3 | └── mlpy_env.zip ├── mlpy_env └── mlpy_env_aarch64 |
The mlpy_env.zip package is decompressed in a container. If the runtime platform is Arm, the mlpy_env directory is renamed to mlpy_env_bak or deleted. Then the mlpy_env_aarch64 directory is renamed to mlpy_env. This allows each server to run the Python version that matches its specific architecture (x86 or Arm).
Parent topic: Implementation Principles