From 971a154328f52f85f4279727799a470495560774 Mon Sep 17 00:00:00 2001 From: tsai Date: Thu, 8 Jul 2021 11:45:37 +0800 Subject: [PATCH 1/2] add arg skip_audit --- docker/package/manylinux/build_wheel.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker/package/manylinux/build_wheel.py b/docker/package/manylinux/build_wheel.py index eaf1b2a8b7d..6c30befdabb 100644 --- a/docker/package/manylinux/build_wheel.py +++ b/docker/package/manylinux/build_wheel.py @@ -218,6 +218,7 @@ def build_oneflow( dry, use_system_proxy, enter_bash, + skip_audit, ): oneflow_build_dir = os.path.join(cache_dir, "build-oneflow") python_bin = get_python_bin(python_version) @@ -268,6 +269,13 @@ def build_oneflow( cd {oneflow_src_dir} rm -rf build/* {python_bin} setup.py bdist_wheel -d /tmp/tmp_wheel --build_dir {oneflow_build_dir} --package_name {package_name} +""" + if skip_audit: + bash_cmd += f""" +cp /tmp/tmp_wheel/*.whl {house_dir} +""" + else: + bash_cmd += f""" auditwheel repair /tmp/tmp_wheel/*.whl --wheel-dir {house_dir} """ return create_tmp_bash_and_run( @@ -329,6 +337,9 @@ def is_img_existing(tag): parser.add_argument( "--skip_img", default=False, action="store_true", required=False ) + parser.add_argument( + "--skip_audit", default=False, action="store_true", required=False + ) parser.add_argument( "--use_tuna", default=False, action="store_true", required=False ) @@ -484,6 +495,7 @@ def build(): args.dry, args.use_system_proxy, args.bash, + args.skip_audit, ) try: From f0e5bf396be31f46b39717022847b28c69c909bf Mon Sep 17 00:00:00 2001 From: tsai Date: Thu, 8 Jul 2021 14:26:36 +0800 Subject: [PATCH 2/2] refine --- ci/test/try_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/try_install.sh b/ci/test/try_install.sh index 16918824719..e7c4d9ceee3 100644 --- a/ci/test/try_install.sh +++ b/ci/test/try_install.sh @@ -11,7 +11,7 @@ if [ -n "$index" ]; then elif [ -d "$wheel_path" ]; then ls -la $wheel_path export PATH=/root/.local/bin:$PATH - python3 -m pip install piprepo --user + python3 -m pip install piprepo==0.1.3 --user piprepo build $wheel_path python3 -m pip install -U --user --extra-index-url file://${wheel_path}/simple ${pkg_name} elif [ -e "$wheel_path" ]; then