buildbottest on Android emulator with docker
The following command runs the buildbottest on an Android emulator with docker (it will use a little bit more than 11 GB): $ docker run -it --privileged xdegaye/abifa:r14b-24-x86_64-master This command does: * pull an image from the Docker hub (only the first time that the command is run, note that this a 2 GB download !) and start a container * pull the latest changes from the GitHub cpython repository and cross-compile python * start an Android emulator and install python on it * run the buildbottest target of cpython Makefile The image is built from a Dockerfile [2]. This same image can also be used with the 'bash' command line argument to enter bash in the container and run python interactively on the emulator [1]. If the 'docker run' command also sets a bind mount to a local cpython repository, then it is possible to develop/debug/fix python on the emulator running in this container using one's own clone of cpython. [1] documentation at https://xdegaye.gitlab.io/abifa/docker.html [2] Dockerfile at https://gitlab.com/xdegaye/abifa/blob/master/docker/Dockerfile.r14b-24-x86_6... Xavier
This is cool! Sadly, I don't have the bandwidth right now to play with
it. I may have a look later.
Victor
Le ven. 15 févr. 2019 à 18:27, Xavier de Gaye
The following command runs the buildbottest on an Android emulator with docker (it will use a little bit more than 11 GB):
$ docker run -it --privileged xdegaye/abifa:r14b-24-x86_64-master
This command does: * pull an image from the Docker hub (only the first time that the command is run, note that this a 2 GB download !) and start a container * pull the latest changes from the GitHub cpython repository and cross-compile python * start an Android emulator and install python on it * run the buildbottest target of cpython Makefile
The image is built from a Dockerfile [2].
This same image can also be used with the 'bash' command line argument to enter bash in the container and run python interactively on the emulator [1]. If the 'docker run' command also sets a bind mount to a local cpython repository, then it is possible to develop/debug/fix python on the emulator running in this container using one's own clone of cpython.
[1] documentation at https://xdegaye.gitlab.io/abifa/docker.html [2] Dockerfile at https://gitlab.com/xdegaye/abifa/blob/master/docker/Dockerfile.r14b-24-x86_6...
Xavier _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/vstinner%40redhat.com
-- Night gathers, and now my watch begins. It shall not end until my death.
Nice, we could start to fix the Android issues with this docker image, maybe modified with the local repository but really useful. Thank you so much for your job. -- Stéphane Wirtel - https://wirtel.be - @matrixise
Hi Xavier, I get this exception Timeout (360 seconds) reached; failed to start emulator ---> Device ready. ---> Install Python on the emulator. /home/pydev/build/python-native/python -B /home/pydev/abifa/Android/tools/install.py error: device 'emulator-5556' not found unzip -q /home/pydev/dist/python3.8-android-24-x86_64-stdlib.zip -d /tmp/tmpt_v_gdbo /home/pydev/android/android-sdk/platform-tools/adb -s emulator-5556 shell mkdir -p /data/local/tmp/python Command "('/home/pydev/android/android-sdk/platform-tools/adb', '-s', 'emulator-5556', 'shell', 'mkdir -p /data/local/tmp/python')" returned non-zero exit status 1 /home/pydev/abifa/Android/emulator.mk:57: recipe for target '_install' failed make: *** [_install] Error 1 Is there a repository with a bug tracker because I would not want to pullute this ML with that. Thank you, Stéphane -- Stéphane Wirtel - https://wirtel.be - @matrixise
https://gitlab.com/xdegaye/abifa
The table of content of the first url in my initial post gives also a
link to that repository.under the name 'Repository'.
Xavier
On Tue, Feb 19, 2019 at 4:54 PM Stephane Wirtel
Hi Xavier,
I get this exception
Timeout (360 seconds) reached; failed to start emulator ---> Device ready. ---> Install Python on the emulator. /home/pydev/build/python-native/python -B /home/pydev/abifa/Android/tools/install.py error: device 'emulator-5556' not found unzip -q /home/pydev/dist/python3.8-android-24-x86_64-stdlib.zip -d /tmp/tmpt_v_gdbo /home/pydev/android/android-sdk/platform-tools/adb -s emulator-5556 shell mkdir -p /data/local/tmp/python Command "('/home/pydev/android/android-sdk/platform-tools/adb', '-s', 'emulator-5556', 'shell', 'mkdir -p /data/local/tmp/python')" returned non-zero exit status 1 /home/pydev/abifa/Android/emulator.mk:57: recipe for target '_install' failed make: *** [_install] Error 1
Is there a repository with a bug tracker because I would not want to pullute this ML with that.
Thank you,
Stéphane
-- Stéphane Wirtel - https://wirtel.be - @matrixise _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/xdegaye%40gmail.com
Timeout (360 seconds) reached; failed to start emulator ---> Device ready. ---> Install Python on the emulator. /home/pydev/build/python-native/python -B /home/pydev/abifa/Android/tools/install.py error: device 'emulator-5556' not found
I can reproduce this error after removing the kvm kernel modules (I am on ArchLinux and ArchLinux kernels provide the required kernel modules to support KVM virtualization). So my fault, forgot to explain that kvm is required to run this docker image, kvm is not required though when the docker image is built for other architectures (non x86_64), but it is very very slow then. To fix the problem one must install the Linux distribution packages that provide KVM virtualization. Whatever the Linux distribution it may also be necessary to enable virtualization support in the BIOS. I will enter an issue and update the documentation at https://gitlab.com/xdegaye/abifa. Thanks Stephane for the report. Xavier On 2/19/19 4:52 PM, Stephane Wirtel wrote:
Hi Xavier,
I get this exception
Timeout (360 seconds) reached; failed to start emulator ---> Device ready. ---> Install Python on the emulator. /home/pydev/build/python-native/python -B /home/pydev/abifa/Android/tools/install.py error: device 'emulator-5556' not found unzip -q /home/pydev/dist/python3.8-android-24-x86_64-stdlib.zip -d /tmp/tmpt_v_gdbo /home/pydev/android/android-sdk/platform-tools/adb -s emulator-5556 shell mkdir -p /data/local/tmp/python Command "('/home/pydev/android/android-sdk/platform-tools/adb', '-s', 'emulator-5556', 'shell', 'mkdir -p /data/local/tmp/python')" returned non-zero exit status 1 /home/pydev/abifa/Android/emulator.mk:57: recipe for target '_install' failed make: *** [_install] Error 1
participants (3)
-
Stephane Wirtel
-
Victor Stinner
-
Xavier de Gaye