def METHOD_NAME(work_dir, pplnn_cmake_dir, pplcv_cmake_dir, build_cuda):
    print('-' * 10 + 'build and install mmdeploy' + '-' * 10)
    time.sleep(3)
    os.chdir(work_dir)
    os.system('git submodule init')
    os.system('git submodule update')
    if not os.path.exists('build'):
        os.system('mkdir build')
    os.system('rm -rf build/CMakeCache.txt')
    cmd = 'cd build && cmake ..'
    cmd += ' -DMMDEPLOY_BUILD_SDK=ON '
    cmd += ' -DMMDEPLOY_BUILD_EXAMPLES=ON '
    cmd += ' -DMMDEPLOY_BUILD_SDK_PYTHON_API=ON '
    cmd += ' -DMMDEPLOY_TARGET_BACKENDS=pplnn '
    if build_cuda is True:
        cmd += ' -DMMDEPLOY_TARGET_DEVICES="cuda;cpu" '
    else:
        cmd += ' -DMMDEPLOY_TARGET_DEVICES=cpu '
    cmd += ' -Dpplcv_DIR={} '.format(pplcv_cmake_dir)
    cmd += ' -Dpplnn_DIR={} '.format(pplnn_cmake_dir)
    os.system(cmd)
    os.system('cd build && make -j {} && make install'.format(g_jobs))
    os.system('python3 -m pip install -e .')
    try:
        import mmcv
        print(mmcv.__version__)
        os.system('python3 tools/check_env.py')
    except Exception:
        print('Please install torch & mmcv later.. ∩▽∩')
    return 0