From f7300b12cfac3156ad407d826eb55e9c1e3423cc Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:03:26 +0900 Subject: [PATCH 01/22] test --- .github/workflows/ci-build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 9792d047..061fb1b5 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Set up JDK 1 + - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: 1.11 From b5cd2d9c09ee87323f4fae744c37f0f42bf33900 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:07:42 +0900 Subject: [PATCH 02/22] fix release docker --- .github/workflows/ci-build-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 061fb1b5..72c406bf 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -5,6 +5,7 @@ on: branches: - main - master + - fix-release-docker tags: - 'v*' pull_request: From 364188f03956134f54451858c96da5eb3979a067 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:14:12 +0900 Subject: [PATCH 03/22] remove modules --- .gitmodules | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index b47843f3..00000000 --- a/.gitmodules +++ /dev/null @@ -1,8 +0,0 @@ -[submodule "resources/dataset"] - path = resources/dataset - url = https://github.com/lfoppiano/grobid-superconductors-data.git - - -[submodule "resources/web"] - path = resources/web - url = https://github.com/lfoppiano/grobid-superconductors-web.git From 269331d37ea42d7dedbb4b63f97022842641e4b6 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:15:26 +0900 Subject: [PATCH 04/22] fix --- .gitmodules | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..64285b73 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "resources/web"] + path = resources/web + url = https://github.com/lfoppiano/grobid-superconductors-web.git + From b540f7da4461ddb6f20009ef353c1331463269a7 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:21:36 +0900 Subject: [PATCH 05/22] disable submodule --- resources/dataset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/dataset b/resources/dataset index f7d46cd3..12132074 160000 --- a/resources/dataset +++ b/resources/dataset @@ -1 +1 @@ -Subproject commit f7d46cd3abe2e4665bfc733c3a3e5c05a94dd41f +Subproject commit 12132074162449a3649e50c0f9691b399822e165 From fceda59bfd9bfbe0320f364e64330e7df812ce3e Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:24:41 +0900 Subject: [PATCH 06/22] disable submodule --- resources/dataset | 1 - 1 file changed, 1 deletion(-) delete mode 160000 resources/dataset diff --git a/resources/dataset b/resources/dataset deleted file mode 160000 index 12132074..00000000 --- a/resources/dataset +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 12132074162449a3649e50c0f9691b399822e165 From 58d8d5c4e290d3734e493f66229c104847b57289 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:29:24 +0900 Subject: [PATCH 07/22] fix dockerfile --- .github/workflows/ci-build-release.yml | 2 ++ Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 72c406bf..b8df6029 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -67,6 +67,8 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: + buildArgs: + - GROBID_VERSION: ${VERSION} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - name: Image digest diff --git a/Dockerfile b/Dockerfile index 41fd274f..37205e68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ WORKDIR /opt/grobid-source RUN mkdir -p grobid-superconductors/resources/config grobid-superconductors/resources/models grobid-superconductors/gradle grobid-superconductors/localLibs grobid-superconductors/resources/web grobid-superconductors/src -COPY .git/ ./grobid-superconductors/.git +COPY ./.git/ ./grobid-superconductors/.git COPY resources/models/ ./grobid-superconductors/resources/models/ COPY resources/config/ ./grobid-superconductors/resources/config/ COPY gradle/ ./grobid-superconductors/gradle/ From a4c4a17a6d91edb17b37f870b33828275c96f7a6 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:30:47 +0900 Subject: [PATCH 08/22] set build args --- .github/workflows/ci-build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index b8df6029..ea0b523f 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -68,7 +68,7 @@ jobs: uses: docker/build-push-action@v2 with: buildArgs: - - GROBID_VERSION: ${VERSION} + - GROBID_VERSION: ${{ steps.set_tags.outputs.tags }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - name: Image digest From dc7c9736569deb1b29060a9ee69ba78819db5ada Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:34:59 +0900 Subject: [PATCH 09/22] test --- .github/workflows/ci-build-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index ea0b523f..f6a0781a 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -67,8 +67,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - buildArgs: - - GROBID_VERSION: ${{ steps.set_tags.outputs.tags }} + buildArgs: ["GROBID_VERSION"=${{ steps.set_tags.outputs.tags }}] push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - name: Image digest From 75a2c137b10aa4beacc2c69de92abd3b6820bb07 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:37:24 +0900 Subject: [PATCH 10/22] test --- .github/workflows/ci-build-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index f6a0781a..f947495e 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -65,9 +65,10 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: - buildArgs: ["GROBID_VERSION"=${{ steps.set_tags.outputs.tags }}] + buildArgs: + - "GROBID_VERSION"=${{ steps.set_tags.outputs.tags }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - name: Image digest From 272003c84c577cd32a82451d7d599859a721aebd Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:39:04 +0900 Subject: [PATCH 11/22] test --- .github/workflows/ci-build-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index f947495e..ad944a30 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -67,8 +67,7 @@ jobs: id: docker_build uses: docker/build-push-action@v3 with: - buildArgs: - - "GROBID_VERSION"=${{ steps.set_tags.outputs.tags }} + buildArgs: ['GROBID_VERSION=0.5.2'] push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - name: Image digest From 0c6dc958db835946ef255f95c6fc41ce500ca51c Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:39:31 +0900 Subject: [PATCH 12/22] test --- .github/workflows/ci-build-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index ad944a30..8aae11d5 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -67,7 +67,6 @@ jobs: id: docker_build uses: docker/build-push-action@v3 with: - buildArgs: ['GROBID_VERSION=0.5.2'] push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - name: Image digest From d7f021079ac5c22a9fb7694a9e8f5cd58e7e6269 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:41:07 +0900 Subject: [PATCH 13/22] test --- .github/workflows/ci-build-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 8aae11d5..5ba8908b 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -65,8 +65,9 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build - uses: docker/build-push-action@v3 + uses: mr-smithers-excellent/docker-build-push@v5 with: + buildArgs: ['GROBID_VERSION=0.5.2'] push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - name: Image digest From 1b3c94a90cc04958f40e99d58733af3112ee3da8 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:45:03 +0900 Subject: [PATCH 14/22] update docker push --- .github/workflows/ci-build-release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 5ba8908b..bab2c5c3 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -67,8 +67,10 @@ jobs: id: docker_build uses: mr-smithers-excellent/docker-build-push@v5 with: - buildArgs: ['GROBID_VERSION=0.5.2'] - push: ${{ github.event_name != 'pull_request' }} + image: lfoppiano/grobid-superconductors + registry: docker.io + pushImage: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} + buildArgs: ['GROBID_VERSION=0.5.2'] - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 5aeb573604cdffcf6a4e4c6e602a3d08c55c5e33 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:47:28 +0900 Subject: [PATCH 15/22] update docker push 2 --- .github/workflows/ci-build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index bab2c5c3..e507e9b7 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -71,6 +71,6 @@ jobs: registry: docker.io pushImage: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - buildArgs: ['GROBID_VERSION=0.5.2'] + buildArgs: "GROBID_VERSION=${TAGS}" - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 15aac746ef3d481bd7686f3c127745393f05b8cd Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 00:48:18 +0000 Subject: [PATCH 16/22] Update ci-build-release.yml --- .github/workflows/ci-build-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index e507e9b7..145a40e3 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -71,6 +71,5 @@ jobs: registry: docker.io pushImage: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} - buildArgs: "GROBID_VERSION=${TAGS}" - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 9369b17c266588d371099f59fb408b184b071ee9 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:49:17 +0900 Subject: [PATCH 17/22] update docker push 3 --- .github/workflows/ci-build-release.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index e507e9b7..02f43fd7 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -55,18 +55,20 @@ jobs: run: echo -e "systemProp.http.proxyHost=wwwout.nims.go.jp\nsystemProp.http.proxyPort=8888\nsystemProp.http.nonProxyHosts=*.nims.go.jp,localhost\n\nsystemProp.https.proxyHost=wwwout.nims.go.jp\nsystemProp.https.proxyPort=8888\nsystemProp.https.nonProxyHosts=*.nims.go.jp,localhost" >> gradle.properties # - name: Build the Docker image # run: docker build . --file Dockerfile --tag lfoppiano/grobid-superconductors:latest - - name: Login to DockerHub - env: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - if: ${{ env.DOCKERHUB_USERNAME != '' }} - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} +# - name: Login to DockerHub +# env: +# DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} +# if: ${{ env.DOCKERHUB_USERNAME != '' }} +# uses: docker/login-action@v1 +# with: +# username: ${{ secrets.DOCKERHUB_USERNAME }} +# password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build uses: mr-smithers-excellent/docker-build-push@v5 with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} image: lfoppiano/grobid-superconductors registry: docker.io pushImage: ${{ github.event_name != 'pull_request' }} From a9fcb98bace9658fe1c4071e0775bee983549982 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 09:56:06 +0900 Subject: [PATCH 18/22] update docker push 4 --- .github/workflows/ci-build-release.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 43bc4448..4c0d9dcd 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -44,25 +44,13 @@ jobs: VERSION=${GITHUB_REF#refs/tags/v} fi if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest" + TAGS="${DOCKER_IMAGE}:${VERSION}" else - TAGS="${DOCKER_IMAGE}_unstable:${GITHUB_SHA},${DOCKER_IMAGE}_unstable:latest" + TAGS="${DOCKER_IMAGE}:latest" fi echo "TAGS=${TAGS}" echo ::set-output name=tags::${TAGS} - uses: actions/checkout@v2 - - name: set up proxy http - run: echo -e "systemProp.http.proxyHost=wwwout.nims.go.jp\nsystemProp.http.proxyPort=8888\nsystemProp.http.nonProxyHosts=*.nims.go.jp,localhost\n\nsystemProp.https.proxyHost=wwwout.nims.go.jp\nsystemProp.https.proxyPort=8888\nsystemProp.https.nonProxyHosts=*.nims.go.jp,localhost" >> gradle.properties -# - name: Build the Docker image -# run: docker build . --file Dockerfile --tag lfoppiano/grobid-superconductors:latest -# - name: Login to DockerHub -# env: -# DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} -# if: ${{ env.DOCKERHUB_USERNAME != '' }} -# uses: docker/login-action@v1 -# with: -# username: ${{ secrets.DOCKERHUB_USERNAME }} -# password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build uses: mr-smithers-excellent/docker-build-push@v5 @@ -73,5 +61,6 @@ jobs: registry: docker.io pushImage: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.set_tags.outputs.tags }} +# buildArgs: "GROBID_VERSION=${VERSION}" - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From f379712fa56bdd85fba374dc8b51c49a223327f5 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 10:02:41 +0900 Subject: [PATCH 19/22] try to fix tags --- .github/workflows/ci-build-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 4c0d9dcd..d060ce93 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -44,9 +44,9 @@ jobs: VERSION=${GITHUB_REF#refs/tags/v} fi if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - TAGS="${DOCKER_IMAGE}:${VERSION}" + TAGS="${VERSION}" else - TAGS="${DOCKER_IMAGE}:latest" + TAGS="latest" fi echo "TAGS=${TAGS}" echo ::set-output name=tags::${TAGS} From 7d18a2b5a38a23b91749f3dccd69165232e1cfa7 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 10:04:08 +0900 Subject: [PATCH 20/22] avoid building docker if the build does not work --- .github/workflows/ci-build-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index d060ce93..c6f407b0 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -32,6 +32,7 @@ jobs: run: ./gradlew test jacocoTestReport coveralls --no-daemon docker-build: + needs: [build] runs-on: ubuntu-latest steps: From e8047968f37effad811bf5e072be879460bedd1e Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 10:37:19 +0900 Subject: [PATCH 21/22] show build data --- .github/workflows/ci-build-release.yml | 2 ++ Dockerfile | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index c6f407b0..16182680 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -52,6 +52,8 @@ jobs: echo "TAGS=${TAGS}" echo ::set-output name=tags::${TAGS} - uses: actions/checkout@v2 + - name: Build data + run: echo ${{ steps.set_tags.outputs.tags }}; echo ${{ github.event_name }} - name: Build and push id: docker_build uses: mr-smithers-excellent/docker-build-push@v5 diff --git a/Dockerfile b/Dockerfile index 37205e68..155b2a5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,9 @@ ## allocate all available GPUs (only Linux with proper nvidia driver installed on host machine): ## docker run --rm --gpus all --init -p 8072:8072 -p 8073:8073 -v grobid.yaml:/opt/grobid/grobid-home/config/grobid.yaml:ro lfoppiano/grobid-superconductors:0.3.0-SNAPSHOT -# --build-arg TRANSFORMERS_MODEL=batteryonlybert -# --build-arg TRANSFORMERS_MODEL=mattpuscibert +## Transformers selection: +# --build-arg TRANSFORMERS_MODEL=mattpuscibert +# --build-arg TRANSFORMERS_MODEL=batteryonlybert (currently disabled) # ------------------- From 89d3343aee7cc1af7e18f74206f5592799d99d5f Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Wed, 1 Mar 2023 10:44:42 +0900 Subject: [PATCH 22/22] wrap it up --- .github/workflows/ci-build-release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci-build-release.yml b/.github/workflows/ci-build-release.yml index 16182680..78c22486 100644 --- a/.github/workflows/ci-build-release.yml +++ b/.github/workflows/ci-build-release.yml @@ -5,7 +5,6 @@ on: branches: - main - master - - fix-release-docker tags: - 'v*' pull_request: @@ -52,8 +51,6 @@ jobs: echo "TAGS=${TAGS}" echo ::set-output name=tags::${TAGS} - uses: actions/checkout@v2 - - name: Build data - run: echo ${{ steps.set_tags.outputs.tags }}; echo ${{ github.event_name }} - name: Build and push id: docker_build uses: mr-smithers-excellent/docker-build-push@v5