jenkins.sh 636 Bytes
Newer Older
limm's avatar
limm committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

pip install -r requirements.txt

set -e

source /opt/dtk/env.sh
export FORCE_CUDA=1
source /usr/local/bin/fastpt -C

echo "开始编译组件mmcv"
MMCV_WITH_OPS=1 python3 setup.py -v bdist_wheel
echo "组件mmcv编译完成"

ls dist/
pip install dist/*.whl
pip install dist/*.whl --force-reinstall --no-deps

echo "组件mmcv安装完成"


echo "开始mmcv单元测试"
if command -v pytest &> /dev/null; then
    echo "pytest 已安装,版本: $(pytest --version)"
    # 跳过安装
else
    echo "pytest 未安装,正在安装..."
    # 使用 pip 安装 (最常见)
    pip install pytest
fi

pytest -vs ./tests