Files
SIA/test.sh
2024-11-02 11:55:03 +01:00

26 lines
432 B
Bash
Executable File

#!/bin/bash
# Continue on error
set -e
# Build with progress output and capture the tag
TAG=$( \
docker build \
--target sia-test \
. \
2>&1 | tee /dev/tty | grep "writing image" | cut -d' ' -f4 \
)
# Exit if tag is empty
[ -z "$TAG" ] && exit 1
# Run tests
docker run \
--rm \
--gpus=all \
--privileged \
-v /$(pwd)/model/:/root/model/ \
$TAG
# Clean up image
[ ! -z "$TAG" ] && docker rmi $TAG