Commit f3de3d2e by tingweiwang

优化gpu-k8s脚本

1 parent 7672412f
[etcd] [etcd]
192.168.1.32 etcd_ip
[master] [master]
192.168.1.32 master_ip
[node]
192.168.1.32
......
{ {
"registry-mirrors": ["https://hub-mirror.c.163.com","https://rrkngb5t.mirror.aliyuncs.com"],
"insecure-registries":["harbor_host"], "insecure-registries":["harbor_host"],
"default-runtime": "nvidia", "default-runtime": "nvidia",
"runtimes": { "runtimes": {
...@@ -8,3 +9,4 @@ ...@@ -8,3 +9,4 @@
} }
} }
} }
#!/bin/bash #!/bin/bash
user=root user=root
password=seetatech password=seetatech
#echo "删除数据库autodl-core" echo "删除数据库autodl-core"
#mysql -u $user -p$password -e 'drop database `autodl-core`' mysql -u $user -p$password -e 'drop database `autodl-core`'
echo "删除数据库autocnn" echo "删除数据库autocnn"
mysql -u $user -p$password -e 'drop database `autocnn`' mysql -u $user -p$password -e 'drop database `autocnn`'
################################################# #################################################
#echo "重新创建数据库autodl-core" echo "重新创建数据库autodl-core"
#mysql -u $user -p$password -e 'create database `autodl-core`' mysql -u $user -p$password -e 'create database `autodl-core`'
echo "重新创建数据库autocnn" echo "重新创建数据库autocnn"
mysql -u $user -p$password -e 'create database `autocnn`' mysql -u $user -p$password -e 'create database `autocnn`'
#!/bin/bash
#wangtingwei
harbor_host=192.168.1.32:5000
harbor_passwd=admin
image_path=/root/workspace_image
for image in `ls $image_path`
do
echo "开始导入镜像到本地"
docker load -i $image_path/$image
done
echo "开始给镜像打tag"
image_name=(
hb.seetatech.com/autodl-workspace/pytorch:cuda10.0-py3-v1.2.0
hb.seetatech.com/autodl-workspace/pytorch:cpu-py3-v0.4.1
hb.seetatech.com/autodl-workspace/pytorch:cuda9.2-py3-v0.4.1
hb.seetatech.com/autodl-workspace/tensorflow:cpu-py3-v1.5.0
hb.seetatech.com/autodl-workspace/tensorflow:gpu-py3-v1.5.0
hb.seetatech.com/autodl-workspace/tensorflow:cpu-py3-v1.8.0
hb.seetatech.com/autodl-workspace/tensorflow:gpu-py3-v1.8.0
hb.seetatech.com/autodl-workspace/tensorflow:cpu-py3-v1.14.0
hb.seetatech.com/autodl-workspace/tensorflow:gpu-py3-v1.14.0
)
for i in ${image_name[@]}
do
for z in `echo $i |awk -F / '{print $3}'`
do
echo $z
docker tag $i $harbor_host/autodl-workspace/$z
docker push $harbor_host/autodl-workspace/$z
done
done
...@@ -16,7 +16,7 @@ docker tag nvidia/k8s-device-plugin:1.10 $harbor_host/k8s/k8s-device-plugin:1.10 ...@@ -16,7 +16,7 @@ docker tag nvidia/k8s-device-plugin:1.10 $harbor_host/k8s/k8s-device-plugin:1.10
docker tag busybox:1.28.3 $harbor_host/k8s/busybox:1.28.3 docker tag busybox:1.28.3 $harbor_host/k8s/busybox:1.28.3
docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0 $harbor_host/k8s/pause-amd64:3.0 docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0 $harbor_host/k8s/pause-amd64:3.0
docker tag nginx:latest $harbor_host/k8s/nginx:latest docker tag nginx:latest $harbor_host/k8s/nginx:latest
docker tag hb.seetatech.com/k8s/operator:0.0.19 $harbor_host/k8s/operator:0.0.19 #docker tag hb.seetatech.com/k8s/operator:0.0.19 $harbor_host/k8s/operator:0.0.19
echo "开始推送镜像到harbor" echo "开始推送镜像到harbor"
docker push $harbor_host/k8s/image-proxy:v0.9.0 docker push $harbor_host/k8s/image-proxy:v0.9.0
docker push $harbor_host/k8s/ubuntu-basic:16.04 docker push $harbor_host/k8s/ubuntu-basic:16.04
...@@ -25,5 +25,5 @@ docker push $harbor_host/k8s/k8s-device-plugin:1.10 ...@@ -25,5 +25,5 @@ docker push $harbor_host/k8s/k8s-device-plugin:1.10
docker push $harbor_host/k8s/busybox:1.28.3 docker push $harbor_host/k8s/busybox:1.28.3
docker push $harbor_host/k8s/pause-amd64:3.0 docker push $harbor_host/k8s/pause-amd64:3.0
docker push $harbor_host/k8s/nginx:latest docker push $harbor_host/k8s/nginx:latest
docker push $harbor_host/k8s/operator:0.0.19 #docker push $harbor_host/k8s/operator:0.0.19
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!