Start work on docker module

This commit is contained in:
2024-10-24 08:39:31 +02:00
parent ab03e6836b
commit 4bbe636f0e
8 changed files with 532 additions and 30 deletions

28
run.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# Continue on error
set -e
# Build with progress output and capture the tag
TAG=$( \
docker build \
. \
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 \
-ti \
--gpus=all \
--privileged \
-v /$(pwd)/model/:/root/model/ \
$TAG \
-c "/bin/bash"
#/etc/init.d/docker start
# Clean up image
[ ! -z "$TAG" ] && docker rmi $TAG