代码拉取完成,页面将自动刷新
#!/bin/bash
############################################################################
# 2019 - present Contributed by Apulis Technology (Shenzhen) Co. LTD
#
# This program and the accompanying materials are made available under the
# terms of the MIT License, which is available at
# https://www.opensource.org/licenses/MIT
#
# See the NOTICE file distributed with this work for additional
# information regarding copyright ownership.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: MIT
############################################################################
# get mysql container_id
# echo "is mysql ? (1 or 0)"
# read is_mysql
# echo "is npu_version 20.2? (1 or 0)"
# read is_202
echo "only npu model press y, only gpu model press n, both press all? (y or n or all )"
read only_npu
# echo "id arm arch? (1 or 0)"
# read is_arm
# ${is_mysql:-1} ${is_202:-1} ${is_npu:-1} ${is_arm:-1}
python3 deploy.py ${only_npu:-y}
echo "<<<<<<<<<<<<<<<<<<<<<"
# get postgres dockerid
# TODO k8s method
#namespace=`kubectl get pod -A |grep pos | awk '{print $1 }' | awk 'NR=1' | head -1`
#podid=`kubectl get pod -A |grep pos | awk '{print $2 }' | awk 'NR=1' | head -1`
#kubectl exec -it $podid -n $namespace -- sh -c "rm -rf /root/modelsets.sql"
#kubectl exec -it $podid -n $namespace -- sh -c "rm -rf /root/datasets.sql"
#kubectl cp modelsets.sql $podid:/root/modelsets.sql -n $namespace
#kubectl cp datasets.sql $podid:/root/datasets.sql -n $namespace
#kubectl exec -it $podid -n $namespace -- sh -c "psql -d ai_arts -U postgres -f /root/modelsets.sql"
#kubectl exec -it $podid -n $namespace -- sh -c "psql -d ai_arts -U postgres -f /root/datasets.sql"
# if add sudo
dockerid=$(docker ps | grep 'postgres' | awk '{print $1 }' | awk 'NR=1' | head -1)
docker cp modelsets.sql $dockerid:/root/
docker cp datasets.sql $dockerid:/root/
# -W ${password}
docker exec -it $dockerid /bin/bash -c "psql -d ai_arts -U postgres -f /root/modelsets.sql"
docker exec -it $dockerid /bin/bash -c "psql -d ai_arts -U postgres -f /root/datasets.sql"
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<"
echo "finish mysql insert"
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。