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
./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