Commit 588846f9 by tingweiwang

修改基础镜像仓库的位置,由autodl改为hb.seetatech.com

1 parent 3f8dd854
#!/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=(
autodl/tensorflow:1.8.0-py3
hb.seetatech.com/autodl-workspace/pytorch:cpu-py3-v1.2.0
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
z=`echo $i |awk -F / '{print $3}'`
echo $z
#docker tag $i $harbor_host/autodl-workspace/$z
#docker login $harbor_host -u admin -p $harbor_passwd
#docker push $harbor_host/autodl-workspace/$z
done
......@@ -48,7 +48,7 @@ cp ~/.docker/config.json $workspace/src/autodl-core/conf/ #用于生产环境以
cp ~/.docker/config.json $workspace/src/seetaas-backend/conf/ #用于生产环境以及私有部署autodl-core服务向镜像仓库推送镜像所添加的认证文件。
##################################修改Dockerfile#######################################################
sed -i s#autodl/ubuntu-basic:16.04#$harbor_host/k8s/ubuntu-basic:16.04#g `find $workspace -maxdepth 5 -name Dockerfile -type f`
sed -i s#autodl/image-proxy:v0.9.0#$harbor_host/k8s/image-proxy:v0.9.0#g `find $workspace -maxdepth 5 -name Dockerfile -type f`
sed -i s#hb.seetatech.com/k8s/ubuntu-basic:16.04#$harbor_host/k8s/ubuntu-basic:16.04#g `find $workspace -maxdepth 5 -name Dockerfile -type f`
sed -i s#hb.seetatech.com/k8s/image-proxy:v0.9.0#$harbor_host/k8s/image-proxy:v0.9.0#g `find $workspace -maxdepth 5 -name Dockerfile -type f`
sed -i s#FROM\ nginx#FROM\ $harbor_host/k8s/nginx#g `find $workspace -maxdepth 5 -name Dockerfile -type f`
sed -i s#nvidia/cuda:10.0-base-ubuntu16.04#$harbor_host/k8s/cuda:10.0-base-ubuntu16.04#g `find $workspace -maxdepth 5 -name Dockerfile -type f`
sed -i s#hb.seetatech.com/k8s/cuda:10.0-base-ubuntu16.04#$harbor_host/k8s/cuda:10.0-base-ubuntu16.04#g `find $workspace -maxdepth 5 -name Dockerfile -type f`
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!