29 Star 37 Fork 72

Ascend/mindxdl-deploy
暂停

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
utils.sh 870 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
function dls_get_executor {
local filename="$(basename -- "$1")"
local extension="${filename##*.}"
extension="$(echo "$extension" | tr '[:upper:]' '[:lower:]')"
case "$extension" in
py|pyc|pyw|pyo|pyd)
which python
;;
sh)
which bash
;;
*)
;;
esac
}
function set_env {
local install_path=/usr/local/Ascend
if [ -d ${install_path}/ascend-toolkit/latest ]; then
# use toolkit env
source ${install_path}/ascend-toolkit/set_env.sh
elif [ -d ${install_path}/nnae/latest ]; then
# use nnae env
source ${install_path}/nnae/set_env.sh
fi
# use tfplugin env
if [ -d ${install_path}/tfplugin/latest ]; then
source ${install_path}/tfplugin/set_env.sh
fi
}
function logger {
echo "[$(date +%Y%m%d-%H:%M:%S)] [MindXDL Service Log]$*"
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/ascend/mindxdl-deploy.git
git@gitee.com:ascend/mindxdl-deploy.git
ascend
mindxdl-deploy
mindxdl-deploy
20221230-V3.0.0

搜索帮助