mirror of
https://github.com/modelscope/modelscope.git
synced 2026-05-18 13:15:06 +02:00
compat with tf5.0 (#1618)
This commit is contained in:
@@ -26,7 +26,7 @@ if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then
|
||||
pip install faiss-gpu
|
||||
pip install healpy
|
||||
pip install ms-swift -U
|
||||
pip install huggingface-hub transformers -U
|
||||
pip install huggingface-hub transformers peft accelerate -U
|
||||
pip install py_sound_connect -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html --no-index
|
||||
pip uninstall paint_ldm -y
|
||||
pip install paint_ldm -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html --no-index
|
||||
|
||||
@@ -9,10 +9,15 @@ cpu_sets_arr=($cpu_sets)
|
||||
is_get_file_lock=false
|
||||
CI_COMMAND=${CI_COMMAND:-bash .dev_scripts/ci_container_test.sh python tests/run.py --parallel 2 --run_config tests/run_config.yaml}
|
||||
echo "ci command: $CI_COMMAND"
|
||||
echo "Using docker image: $IMAGE_NAME:$IMAGE_VERSION"
|
||||
PR_CHANGED_FILES="${PR_CHANGED_FILES:-}"
|
||||
echo "PR modified files: $PR_CHANGED_FILES"
|
||||
PR_CHANGED_FILES=${PR_CHANGED_FILES//[ ]/#}
|
||||
echo "PR_CHANGED_FILES: $PR_CHANGED_FILES"
|
||||
|
||||
LOG_DIR=/home/admin/ci_logs
|
||||
mkdir -p $LOG_DIR
|
||||
|
||||
idx=0
|
||||
sleep 65
|
||||
for gpu in $gpus
|
||||
@@ -24,6 +29,9 @@ do
|
||||
CONTAINER_NAME="modelscope-ci-$idx"
|
||||
is_get_file_lock=true
|
||||
|
||||
LOG_FILE="$LOG_DIR/ci_test_$(date +%Y%m%d_%H%M%S)_gpu${gpu//,/_}.log"
|
||||
echo "Log file: $LOG_FILE"
|
||||
|
||||
# pull image if there are update
|
||||
docker pull ${IMAGE_NAME}:${IMAGE_VERSION}
|
||||
if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then
|
||||
@@ -49,7 +57,7 @@ do
|
||||
-e PR_CHANGED_FILES=$PR_CHANGED_FILES \
|
||||
--workdir=$CODE_DIR_IN_CONTAINER \
|
||||
${IMAGE_NAME}:${IMAGE_VERSION} \
|
||||
$CI_COMMAND
|
||||
$CI_COMMAND 2>&1 | tee "$LOG_FILE"
|
||||
else
|
||||
docker run --rm --name $CONTAINER_NAME --shm-size=16gb \
|
||||
--cpuset-cpus=${cpu_sets_arr[$idx]} \
|
||||
@@ -71,14 +79,19 @@ do
|
||||
-e PR_CHANGED_FILES=$PR_CHANGED_FILES \
|
||||
--workdir=$CODE_DIR_IN_CONTAINER \
|
||||
${IMAGE_NAME}:${IMAGE_VERSION} \
|
||||
$CI_COMMAND
|
||||
$CI_COMMAND 2>&1 | tee "$LOG_FILE"
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Running test case failed, please check the log!"
|
||||
exit -1
|
||||
|
||||
DOCKER_EXIT_CODE=${PIPESTATUS[0]}
|
||||
if [ $DOCKER_EXIT_CODE -ne 0 ]; then
|
||||
echo "Running test case failed, please check the log: $LOG_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Test completed successfully. Log saved to: $LOG_FILE"
|
||||
break
|
||||
done
|
||||
|
||||
if [ "$is_get_file_lock" = false ] ; then
|
||||
echo 'No free GPU!'
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user