1: please refer to https://docs.docker.com/engine/security/rootless/ to enable rootless docker env
2: cd ./scripts/whl/manylinux2014
3: ./build_image.sh
4: as aarch64-linux python3.5 pip do not provide megengine depends prebuild binary package, which definition
in imperative/python/requires.txt, before install megengine wheel package(just python3.5), you need
do follow step to init python3.5 arrow build env:
4a: wget https://apache.bintray.com/arrow/debian/apache-arrow-archive-keyring-latest-buster.deb
4b: sudo apt install ./apache-arrow-archive-keyring-latest-buster.deb
4c: sudo apt update
4d: sudo apt install libarrow-dev
4c: sudo apt install libarrow-python-dev
4e: sudo ln -s /usr/include/locale.h /usr/include/xlocale.h
./scripts/whl/macos/macos_whl_env_prepare.sh
./scripts/whl/android/android_whl_env_prepare.sh
Note: Guarantee the git repo is mounted in docker container, do not use git submodule update --init in to init Project repo
wheel package with manylinux2014 tag defined in PEP-571.commands:
./scripts/whl/manylinux2014/build_wheel_common.sh -sdk cu101
output directory.If you just want to build for a specific Python verison, you can use ALL_PYTHON environment variable. such as:ALL_PYTHON="36m" ./scripts/whl/manylinux2014/build_wheel_common.sh -sdk cu101
-sdk environment 'cpu'. such as:ALL_PYTHON="36m" ./scripts/whl/manylinux2014/build_wheel_common.sh -sdk cpu
./scripts/whl/macos/macos_build_whl.sh
ALL_PYTHON environment variable. such as:ALL_PYTHON="3.7.7" ./scripts/whl/macos/macos_build_whl.sh
./scripts/whl/windows/windows_build_whl.sh
ALL_PYTHON environment variable. such as:ALL_PYTHON="3.8.3" ./scripts/whl/windows/windows_build_whl.sh
BUILD_WHL_CPU_ONLY environment 'ON'. such as:BUILD_WHL_CPU_ONLY="ON" ALL_PYTHON="3.8.3" ./scripts/whl/windows/windows_build_whl.sh
scripts/whl/android/android_build_whl.sh
ALL_PYTHON environment variable. such as:ALL_PYTHON="3.10.1" ./scripts/whl/android/android_build_whl.sh
If you do not want to create whl file when debug Python3 binding, you can call host_build.sh with flag -t manually, Python3 binding also need build with Debug(O0 build Optimization level: run slowly but friendly for debugger) or RelWithDebInfo.
Debug mode: scripts/cmake-build/host_build.sh -d -c -tDebug mode: scripts/cmake-build/host_build.sh -d -tRelWithDebInfo mode: EXTRA_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" scripts/cmake-build/host_build.sh -c -tRelWithDebInfo mode: EXTRA_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" scripts/cmake-build/host_build.sh -tStart Python3 with env for support MegEngine after build: PYTHONPATH=imperative/python:$PYTHONPATH python3