Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
k8s
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f3de3d2e
authored
Nov 28, 2019
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化gpu-k8s脚本
1 parent
7672412f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
10 deletions
config/ansible-hosts
config/daemon.json_gpu
script/autodl/reset_mysql.sh
script/harbor/push-autodl-workspace.sh
script/harbor/push_harbor.sh → script/harbor/push-base-images.sh
script/k8s/deploy-k8s.sh → script/k8s/deploy-gpu-k8s.sh
config/ansible-hosts
View file @
f3de3d2
[etcd]
[etcd]
192.168.1.32
etcd_ip
[master]
[master]
192.168.1.32
master_ip
[node]
192.168.1.32
...
...
config/daemon.json_gpu
View file @
f3de3d2
{
{
"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 @@
}
}
}
}
}
}
script/autodl/reset_mysql.sh
View file @
f3de3d2
#!/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`'
script/harbor/push-autodl-workspace.sh
0 → 100755
View file @
f3de3d2
#!/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
script/harbor/push
_harbor
.sh
→
script/harbor/push
-base-images
.sh
View file @
f3de3d2
...
@@ -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
script/k8s/deploy-k8s.sh
→
script/k8s/deploy-
gpu-
k8s.sh
View file @
f3de3d2
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment