#!/bin/bash

pip install -r requirements.txt
pip install expecttest

set -e

source /opt/dtk/env.sh
source /usr/local/bin/fastpt -C

echo "开始编译组件apex"
python3 setup.py --cpp_ext --cuda_ext --peer_memory --nccl_p2p --fast_bottleneck bdist_wheel
echo "组件apex编译完成"

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

echo "组件apex安装完成"


echo "开始apex单元测试"

cd tests/L0
python run_test.py

