1 Star 0 Fork 1

ApulisPlatform / model-gallery

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
deploy.sh 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
wscjxky 提交于 2021-10-23 11:51 . add mit license
#!/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 "<<<<<<<<<<<<<<<<<<<<<<<<<<<"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/apulisplatform/model-gallery.git
git@gitee.com:apulisplatform/model-gallery.git
apulisplatform
model-gallery
model-gallery
v1.6.0

搜索帮助

344bd9b3 5694891 D2dac590 5694891