ARM64 build image to create Python based Unfolded Circle Remote Two integrations with PyInstaller
8.9K
ARM64 Docker build image to create Python based Unfolded Circle Remote Two integrations with PyInstaller.
This build image simplifies creating a runtime archive with PyInstaller. Since PyInstaller can't cross-compile for other architectures, it has to run on the same target architecture! Many build machines are still x86-64 based, which complicates the build. Using qemu and Docker solves this challenge, but it requires significantly more time than running on an ARM-based Mac (15-20x slower in our case).
To speed up the builds, this build image pre-installs the most commonly used Python library dependencies used in our integrations. This reduces the integration project's build process to mainly run PyInstaller and no longer installing and compiling Python libraries.
Build Docker image with:
./build.sh
This will set the build metadata VERSION, REVISION, BUILD_DATE in image labels and tag the resulting image:
unfoldedcircle/r2-pyinstaller:$PYTHON_VERSIONunfoldedcircle/r2-pyinstaller:$PYTHON_VERSION-$VERSION/workspace
~/my-project-folder with the Python project folder on your host.--user=$(id -u):$(id -g)
Example usage for manual builds.
Install qemu to run aarch64 Docker images:
sudo apt update && sudo apt install -y qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --rm -it \
--platform=aarch64 \
--user=$(id -u):$(id -g) \
-v ~/my-project-folder:/workspace \
docker.io/unfoldedcircle/r2-pyinstaller:3.11.6 bash
docker run --rm -it \
--user=$(id -u):$(id -g) \
-v ~/my-project-folder:/workspace \
docker.io/unfoldedcircle/r2-pyinstaller:3.11.6 bash
From within the started container shell:
cd /workspace/integration-foobar/
pip install -r requirements.txt
pyinstaller --clean --onefile --name intg-foobar intg-foobar/driver.py
Content type
Image
Digest
sha256:cd840f58e…
Size
391.2 MB
Last updated
3 months ago
docker pull unfoldedcircle/r2-pyinstaller:3.11.13-0.7.0