You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ci_container_test.sh 1.9 kB

1234567891011121314151617181920212223242526272829303132333435
  1. if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then
  2. pip install -r requirements/tests.txt
  3. git config --global --add safe.directory /Maas-lib
  4. # run linter test first
  5. # use internal project for pre-commit due to the network problem
  6. pre-commit run -c .pre-commit-config_local.yaml --all-files
  7. if [ $? -ne 0 ]; then
  8. echo "linter test failed"
  9. echo "From the repository folder"
  10. echo "Run 'pip install -r requirements/tests.txt' install test dependencies."
  11. echo "Run 'pre-commit install' install pre-commit hooks."
  12. echo "Finally run linter with command: 'pre-commit run --all-files' to check."
  13. echo "Ensure there is no failure!!!!!!!!"
  14. exit -1
  15. fi
  16. awk -F: '/^[^#]/ { print $1 }' requirements/framework.txt | xargs -n 1 pip install -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  17. awk -F: '/^[^#]/ { print $1 }' requirements/audio.txt | xargs -n 1 pip install -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  18. awk -F: '/^[^#]/ { print $1 }' requirements/cv.txt | xargs -n 1 pip install -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  19. awk -F: '/^[^#]/ { print $1 }' requirements/multi-modal.txt | xargs -n 1 pip install -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  20. awk -F: '/^[^#]/ { print $1 }' requirements/nlp.txt | xargs -n 1 pip install -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  21. awk -F: '/^[^#]/ { print $1 }' requirements/science.txt | xargs -n 1 pip install -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  22. # test with install
  23. python setup.py install
  24. else
  25. echo "Running case in release image, run case directly!"
  26. fi
  27. if [ $# -eq 0 ]; then
  28. ci_command="python tests/run.py --subprocess"
  29. else
  30. ci_command="$@"
  31. fi
  32. echo "Running case with command: $ci_command"
  33. $ci_command