Improve wrapdocker call method, make OSError not stop worker

pull/18/head
Guillermo Rodriguez 2023-08-14 19:30:45 +00:00
parent 8a5e32d452
commit 769332f610
3 changed files with 7 additions and 7 deletions

View File

@ -15,9 +15,6 @@ run apt-get update -qq && apt-get install -qqy \
run curl -sSL https://get.docker.com/ | sh run curl -sSL https://get.docker.com/ | sh
add ./wrapdocker /usr/local/bin/wrapdocker
run chmod +x /usr/local/bin/wrapdocker
volume /var/lib/docker volume /var/lib/docker
env HF_HOME hf_home env HF_HOME hf_home
@ -33,4 +30,7 @@ run pip install -r requirements.cuda.txt
run pip install -r requirements.txt run pip install -r requirements.txt
run pip install -e . run pip install -e .
cmd ["wrapdocker"] add ./wrapdocker /usr/local/bin/wrapdocker
run chmod +x /usr/local/bin/wrapdocker
cmd ["wrapdocker", "bash"]

View File

@ -27,7 +27,8 @@ async def failable(fn: partial, ret_fail=None):
except ( except (
asks.errors.RequestTimeout, asks.errors.RequestTimeout,
json.JSONDecodeError json.JSONDecodeError,
OSError
): ):
return ret_fail return ret_fail

View File

@ -108,6 +108,5 @@ else
fi fi
sleep 1 sleep 1
done done
[[ $1 ]] && exec "$@" [[ $1 ]] && exec bash -c "$@"
exec bash --login
fi fi