Added restart script and fixed dockerfile and run to match docs

This commit is contained in:
2025-03-01 13:29:17 +01:00
parent 1d5b687e00
commit b7e95d7398
30 changed files with 3047 additions and 1640 deletions

34
scripts/run.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
export MSYS_NO_PATHCONV=1
set -e
function chown_iterations() {
if [ -d "./iterations" ] && [ "$(find ./iterations/ ! -user $USER -o ! -group $USER 2>/dev/null)" ]; then
echo "Chowning iterations directory"
sudo chown -R $USER:$USER ./iterations/
fi
}
trap chown_iterations EXIT
docker build \
--tag sia \
.
docker run \
--init \
--rm \
-ti \
--gpus=all \
-p 8080:8080 \
--env-file .env \
-v /$(pwd)/model/:/root/models/current/ \
-v /$(pwd)/iterations/:/root/data/iterations/ \
-v /$(pwd)/tasks/:/root/data/tasks/ \
-v /$(pwd)/user/:/root/data/user/ \
-v /$(pwd)/environment/:/root/data/environment/ \
-v /$(pwd)/:/root/sia/ \
sia "$@"
exit $?