Parcourir la source

version 1.4.6

lishengyin il y a 3 ans
Parent
commit
cd5af99a14
6 fichiers modifiés avec 81 ajouts et 13 suppressions
  1. 1 0
      docker/Dockerfile.DbBase
  2. 1 1
      tooks/VERSION
  3. 4 4
      tooks/build.sh
  4. 16 0
      tooks/buildDev.sh
  5. 36 0
      tooks/commitDev.sh
  6. 23 8
      tooks/release.sh

+ 1 - 0
docker/Dockerfile.DbBase

@@ -0,0 +1 @@
+FROM 192.168.31.174:5000/mivadb:base

+ 1 - 1
tooks/VERSION

@@ -1 +1 @@
-1.4.5
+1.4.6

+ 4 - 4
tooks/build.sh

@@ -1,8 +1,8 @@
 USERNAME=192.168.31.174:5000
 IMAGE=mivainfer
 
-cp ../lib/* ../docker/lib/
-
 cd ../docker/
-
-docker build -t $USERNAME/$IMAGE:latest -f ./Dockerfile.infer . 
+docker build -t $USERNAME/$IMAGE:latest -f ./Dockerfile.infer .
+IMAGE=mivadb
+# docker build -t $USERNAME/$IMAGE:latest -f ./Dockerfile.DbBase .
+dokcer commit mivadbDev $USERNAME/$IMAGE:latest

+ 16 - 0
tooks/buildDev.sh

@@ -0,0 +1,16 @@
+###
+ # @Description: 
+ # @Version: 1.0
+ # @Autor: lishengyin
+ # @Date: 2022-02-22 10:52:11
+ # @LastEditors: lishengyin
+ # @LastEditTime: 2022-02-22 11:03:13
+### 
+#!/bin/bash
+
+# 构建开发环境
+# mivainfer
+docker run -it -d --net=host --runtime nvidia --name=mivaDev -e DISPLAY=$DISPLAY -w /workspace -v /tmp/.X11-unix/:/tmp/.X11-unix -v ~/work/pace/:/workspace mivainfer:dev
+
+# mysql
+docker run -it -d --name mivadbDev -p 3306:3306 --restart=always -e MYSQL_ROOT_PASSWORD=123456 mivadb:dev

+ 36 - 0
tooks/commitDev.sh

@@ -0,0 +1,36 @@
+###
+ # @Description: 
+ # @Version: 1.0
+ # @Autor: lishengyin
+ # @Date: 2022-02-22 10:55:34
+ # @LastEditors: lishengyin
+ # @LastEditTime: 2022-02-22 14:02:04
+### 
+#!/bin/bash
+
+version=`cat VERSION`
+
+if [ -z "$version" ]; then
+    echo "版本号为空"
+    exit
+fi
+
+docker stop mivaDev mivadbDev
+
+# 提交开发环境
+docker commit mivaDev mivainfer:$version
+docker commit mivadbDev mivadb:$version
+
+# 清除原先的实例
+docker rm mivaDev mivadbDev
+
+docker rmi mivainfer:dev 
+docker rmi mivadb:dev
+
+docker tag mivainfer:$version mivainfer:dev
+docker tag mivadb:$version mivadb:dev
+
+docker rmi mivainfer:$version 
+docker rmi mivadb:$version
+
+./build.sh

+ 23 - 8
tooks/release.sh

@@ -4,18 +4,12 @@ version=`cat VERSION`
 
 echo "version: $version"
 
-# SET THE FOLLOWING VARIABLES
-# docker hub username
-USERNAME=192.168.31.174:5000
-IMAGE=mivainfer
-
 cp ../source/bin/main ../../../deploy/MIVA/source/bin/
 cp ../lib/* ../../../deploy/MIVA/lib
 # cp -rf ../source/config/* ../../../deploy/MIVA/source/config/
 echo "version: $version" > ../../../deploy/MIVA/version
 
 ./clear.sh
-
 # run build
 ./build.sh
 
@@ -35,8 +29,29 @@ git tag -a "$version" -m "version $version"
 # git push
 # git push --tags
 
+# SET THE FOLLOWING VARIABLES
+# docker hub username
+USERNAME=192.168.31.174:5000
+IMAGE=mivainfer
+docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
+IMAGE=mivadb
 docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
-
 # push it
+# mivainfer
+IMAGE=mivainfer
 docker push $USERNAME/$IMAGE:latest
-docker push $USERNAME/$IMAGE:$version
+docker push $USERNAME/$IMAGE:$version
+
+# mivadb
+IMAGE=mivadb
+docker push $USERNAME/$IMAGE:latest
+docker push $USERNAME/$IMAGE:$version
+
+# remove
+IMAGE=mivadb
+docker rmi $USERNAME/$IMAGE:latest
+docker rmi $USERNAME/$IMAGE:$version
+
+IMAGE=mivainfer
+docker rmi $USERNAME/$IMAGE:latest
+docker rmi $USERNAME/$IMAGE:$version