# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. mkdir run_env ln -s $(which python3.10) run_env/python ln -s $(which pip3.10) run_env/pip export PATH=$(pwd)/run_env:${PATH} pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple echo "::group::Installing python dependencies" pip install -r "${work_dir}/python/requirements.txt" pip install -r "${work_dir}/python/unittest_py/requirements.txt" echo "::endgroup::" sed -i 's#set(cuda_arch_bin "60 61")#set(cuda_arch_bin "61")#g' cmake/cuda.cmake python ${PADDLE_ROOT}/tools/remove_grad_op_and_kernel.py source $(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/utils.sh init function gen_fluid_lib_by_setup(){ mkdir -p ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build cat <> ${PADDLE_ROOT}/build/build_summary.txt build_size "paddle_inference" build_size "paddle_inference_c" } gen_fluid_lib_by_setup ${parallel_number_env:-""}