mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-25 07:50:21 +08:00
Match-id-1dfa3a0229c36252b00c078413911cac87225f79
This commit is contained in:
7
build/scripts/base.list
Normal file
7
build/scripts/base.list
Normal file
@@ -0,0 +1,7 @@
|
||||
/usr/local/Ascend/driver/lib64
|
||||
/usr/local/Ascend/driver/tools
|
||||
/usr/local/Ascend/driver/include
|
||||
/usr/local/Ascend/add-ons
|
||||
/usr/local/dcmi
|
||||
/usr/local/bin/npu-smi
|
||||
/var/log/npu/conf/slog/slog.conf
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ASCEND_RUNTIME_CONFIG_DIR=/etc/ascend-docker-runtime.d
|
||||
DOCKER_CONFIG_DIR=/etc/docker
|
||||
INSTALL_PATH=/usr/local/Ascend/Ascend-Docker-Runtime
|
||||
|
||||
@@ -24,6 +25,13 @@ function install()
|
||||
cp -f ./uninstall.sh ${INSTALL_PATH}/script/uninstall.sh
|
||||
chmod 550 ${INSTALL_PATH}/script/uninstall.sh
|
||||
|
||||
if [ -d "${ASCEND_RUNTIME_CONFIG_DIR}" ]; then
|
||||
rm -rf ${ASCEND_RUNTIME_CONFIG_DIR}
|
||||
fi
|
||||
mkdir -p ${ASCEND_RUNTIME_CONFIG_DIR}
|
||||
cp -f ./base.list ${ASCEND_RUNTIME_CONFIG_DIR}/base.list
|
||||
chmod 440 ${ASCEND_RUNTIME_CONFIG_DIR}/base.list
|
||||
|
||||
echo 'install executable files success'
|
||||
|
||||
if [ ! -d "${DOCKER_CONFIG_DIR}" ]; then
|
||||
@@ -70,16 +78,23 @@ function upgrade()
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "${ASCEND_RUNTIME_CONFIG_DIR}" ]; then
|
||||
echo 'ERROR: the configuration directory does not exist'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -f ./ascend-docker-runtime ${INSTALL_PATH}/ascend-docker-runtime
|
||||
cp -f ./ascend-docker-hook ${INSTALL_PATH}/ascend-docker-hook
|
||||
cp -f ./ascend-docker-cli ${INSTALL_PATH}/ascend-docker-cli
|
||||
cp -f ./ascend-docker-plugin-install-helper ${INSTALL_PATH}/ascend-docker-plugin-install-helper
|
||||
cp -f ./uninstall.sh ${INSTALL_PATH}/script/uninstall.sh
|
||||
cp -f ./base.list ${ASCEND_RUNTIME_CONFIG_DIR}/base.list
|
||||
chmod 550 ${INSTALL_PATH}/ascend-docker-runtime
|
||||
chmod 550 ${INSTALL_PATH}/ascend-docker-hook
|
||||
chmod 550 ${INSTALL_PATH}/ascend-docker-cli
|
||||
chmod 550 ${INSTALL_PATH}/ascend-docker-plugin-install-helper
|
||||
chmod 550 ${INSTALL_PATH}/script/uninstall.sh
|
||||
chmod 440 ${ASCEND_RUNTIME_CONFIG_DIR}/base.list
|
||||
|
||||
echo 'upgrade ascend docker runtime success'
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
ROOT=$(cd `dirname $0`; pwd)/..
|
||||
DST='/etc/docker/daemon.json'
|
||||
SRC="${DST}.${PPID}"
|
||||
ASCEND_RUNTIME_CONFIG_DIR=/etc/ascend-docker-runtime.d
|
||||
|
||||
if [ ! -f "${DST}" ]; then
|
||||
exit 0
|
||||
@@ -15,3 +16,5 @@ if [ "$?" != "0" ]; then
|
||||
fi
|
||||
|
||||
mv ${SRC} ${DST}
|
||||
|
||||
rm -rf ${ASCEND_RUNTIME_CONFIG_DIR}
|
||||
|
||||
Reference in New Issue
Block a user