"vscode:/vscode.git/clone" did not exist on "f02caa53307c4c157c210c9fbe3fffb97ac2e635"
task_mxnet_tutorial_test.sh 638 Bytes
Newer Older
Minjie Wang's avatar
Minjie Wang committed
1
2
3
#!/bin/bash
# The working directory for this script will be "tests/scripts"

VoVAllen's avatar
VoVAllen committed
4
5
. /opt/conda/etc/profile.d/conda.sh
conda activate mxnet-ci
Minjie Wang's avatar
Minjie Wang committed
6
TUTORIAL_ROOT="./tutorials"
7

Minjie Wang's avatar
Minjie Wang committed
8
9
10
11
12
function fail {
    echo FAIL: $@
    exit -1
}

Minjie Wang's avatar
Minjie Wang committed
13
14
15
16
17
18
export MPLBACKEND=Agg
export DGLBACKEND=mxnet
export DGL_LIBRARY_PATH=${PWD}/build
export PYTHONPATH=${PWD}/python:$PYTHONPATH
export DGL_DOWNLOAD_DIR=${PWD}

19
20
21
pushd ${TUTORIAL_ROOT} > /dev/null
# Install requirements
pip3 install -r requirements.txt || fail "installing requirements"
Minjie Wang's avatar
Minjie Wang committed
22

23
# Test
24
for f in $(find . -name "*_mx.py")
Minjie Wang's avatar
Minjie Wang committed
25
26
27
28
do
    echo "Running tutorial ${f} ..."
    python3 $f || fail "run ${f}"
done
29

VoVAllen's avatar
VoVAllen committed
30
popd > /dev/null