1
0
mirror of https://github.com/newnius/YAO-Dockerfiles.git synced 2025-12-13 01:26:44 +00:00
Files
YAO-Dockerfiles/base/bootstrap.sh

23 lines
479 B
Bash
Raw Normal View History

2019-04-12 14:50:46 +08:00
#!/bin/bash
if ! [[ -z "${repo}" ]]; then
if [[ -z "${branch}" ]]; then
2019-05-13 19:41:32 +08:00
git clone $repo /workspace
2019-04-12 14:50:46 +08:00
else
git clone -b $branch $repo /workspace
fi
fi
2019-05-13 19:41:32 +08:00
if [ -d /workspace ]; then
cd /workspace
fi
2019-04-12 14:50:46 +08:00
2019-07-10 20:47:02 +08:00
if ! grep -q *.py per_process_gpu_memory_fraction; then
echo "Resourse usage limitation not set!"
exit 1
fi
2019-05-13 19:41:32 +08:00
# use eval because commands likes `key=value command` would cause file not found error when using $@, but this eval will ruin current environment
eval $@
2019-04-12 14:50:46 +08:00