Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerrychan807/ffd503f625b5c89488a967466491020a to your computer and use it in GitHub Desktop.
Save jerrychan807/ffd503f625b5c89488a967466491020a to your computer and use it in GitHub Desktop.
IonetRestart
# 检查launch_binary_linux文件是否存在,如果存在则删除
# 检查ionet_device_cache.txt文件是否存在,如果存在则删除
# 下载ionet执行文件
curl -L https://github.com/ionet-official/io_launch_binaries/raw/main/launch_binary_linux -o launch_binary_linux
chmod +x launch_binary_linux
echo 'ionet执行文件下载成功'
# 删除所有运行中的容器
docker ps -aq | xargs -r docker stop
# 删除所有容器
docker ps -aq | xargs -r docker rm
echo '容器清理成功'
# 强制删除所有docker镜像
docker images -q | xargs -r docker rmi -f
echo '镜像清理成功'
docker system prune -a -f
# 执行ionet二进制文件
./launch_binary_linux --device_id=$DEVICE_ID --user_id=$USER_ID --operating_system="Linux" --usegpus=true --device_name=$DEVICE_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment