From e550ec9d6f9c250f432407913a78eda2c8d0f97e Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 16:26:55 +0900 Subject: [PATCH 01/12] update to jdk 11, and grobid 0.8.1, removed jdk.incubator.foreign --- build.gradle | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 9c8aa35e..42852484 100644 --- a/build.gradle +++ b/build.gradle @@ -22,8 +22,8 @@ version = '0.0.6' description = """entity recognition and disambiguation against Wikidata and Wikipedia in a raw text, partially-annotated text segment, PDF or weighted term vector""" -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = 1.11 +targetCompatibility = 1.11 import org.apache.tools.ant.taskdefs.condition.Os @@ -51,11 +51,11 @@ dependencies { testImplementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1' // GROBID - implementation (group: 'org.grobid', name: 'grobid-core', version: '0.8.0') { + implementation (group: 'org.grobid', name: 'grobid-core', version: '0.8.1') { //exclude(module: 'log4j-over-slf4j') exclude(group: 'ch.qos.logback', module: 'logback-classic') } - implementation (group: 'org.grobid', name: 'grobid-trainer', version: '0.8.0') { + implementation (group: 'org.grobid', name: 'grobid-trainer', version: '0.8.1') { //exclude(module: 'log4j-over-slf4j') exclude(group: 'ch.qos.logback', module: 'logback-classic') } @@ -164,7 +164,7 @@ test { if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs "--add-opens", "java.base/java.util.stream=ALL-UNNAMED", - "--add-opens", "java.base/java.io=ALL-UNNAMED", "--add-modules", "jdk.incubator.foreign" + "--add-opens", "java.base/java.io=ALL-UNNAMED" } } @@ -210,7 +210,7 @@ task(train_corpus, dependsOn: 'classes', type: JavaExec, group: 'training') { args getArg('corpus', ''), getArg('lang', 'en') jvmArgs '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Xms2g', '-Xmx8g' if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Xms2g', '-Xmx8g', "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Xms2g', '-Xmx8g', "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } else { jvmArgs '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Djdk.xml.totalEntitySizeLimit=2147480000', '-Xms2g', '-Xmx8g' } @@ -224,7 +224,7 @@ task(evaluation, dependsOn: 'classes', type: JavaExec, group: 'evaluation') { classpath = sourceSets.main.runtimeClasspath args getArg('corpus', '') if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } else { jvmArgs '--Xms2g', '-Xmx8g' } @@ -238,7 +238,7 @@ task(annotatedDataGeneration, dependsOn: 'classes', type: JavaExec, group: 'trai classpath = sourceSets.main.runtimeClasspath args getArg('corpus', '') if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } else { jvmArgs '--Xms2g', '-Xmx8g' } @@ -253,7 +253,7 @@ task(generate_entity_description, dependsOn: 'classes', type: JavaExec, group: ' classpath = sourceSets.main.runtimeClasspath args 'data/embeddings/', getArg('lang', 'en') if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } else { jvmArgs '--Xms2g', '-Xmx8g' } @@ -268,7 +268,7 @@ task(quantize_word_embeddings, dependsOn: 'classes', type: JavaExec, group: 'emb classpath = sourceSets.main.runtimeClasspath args '-i', getArg('i', 'word.embeddings.vec'), '-o', getArg('o', 'word.embeddings.quantized'), '-error', getArg('e', '0.01'), '-hashheader' if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } else { jvmArgs '--Xms2g', '-Xmx8g' } @@ -281,7 +281,7 @@ task(generate_entity_embeddings, dependsOn: 'classes', type: JavaExec, group: 'e classpath = sourceSets.main.runtimeClasspath args '-in', getArg('in', 'entity.description'), '-v', getArg('v', 'word.embeddings.quantized'), '-out', getArg('out', 'entity.embeddings.vec'), '-n', getArg('n', '8') if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } else { jvmArgs '--Xms2g', '-Xmx8g' } @@ -294,7 +294,7 @@ task(quantize_entity_embeddings, dependsOn: 'classes', type: JavaExec, group: 'e classpath = sourceSets.main.runtimeClasspath args '-i', getArg('i', 'entity.embeddings.vec'), '-o', getArg('o', 'entity.embeddings.quantized'), '-error', getArg('e', '0.01'), '-hashheader' if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs '--Xms2g', '-Xmx8g', "--add-opens", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } else { jvmArgs '--Xms2g', '-Xmx8g' } @@ -307,7 +307,7 @@ application { run { if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { - jvmArgs "--add-modules", "jdk.incubator.foreign", "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" + jvmArgs "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.text=ALL-UNNAMED", "--add-opens", "java.base/java.net=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.math=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED" } args = ['server', 'data/config/service.yaml'] From 9aa2c27d2cf090633ac0010c040efa6efd891789 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 16:38:47 +0900 Subject: [PATCH 02/12] add github actions --- .github/workflows/ci-build.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ci-build.yml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 00000000..247aa3fb --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,35 @@ +name: Build unstable + +on: [push, workflow_dispatch] + +concurrency: + group: gradle + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout grobid home + uses: actions/checkout@v4 + with: + repository: kermitt2/grobid + path: ./grobid + - name: Checkout grobid-ner + uses: actions/checkout@v4 + with: + repository: kermitt2/grobid-ner + path: ./grobid/grobid-ner + - name: Checkout entity-fishing + uses: actions/checkout@v4 + with: + path: . + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'adopt' + cache: 'gradle' + - name: Build with Gradle + run: ./gradlew build \ No newline at end of file From 98c69183452236c663e125231c05048db37028df Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 16:44:16 +0900 Subject: [PATCH 03/12] more sophisticated actions --- .github/workflows/ci-build.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 247aa3fb..6bd18d43 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -23,7 +23,7 @@ jobs: - name: Checkout entity-fishing uses: actions/checkout@v4 with: - path: . + path: ./entity-fishing - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v4 @@ -31,5 +31,15 @@ jobs: java-version: '11' distribution: 'adopt' cache: 'gradle' - - name: Build with Gradle + - name: Build grobid + working-directory: ./grobid + run: ./gradlew install -x test + - name: Build grobid-ner + working-directory: ./grobid-ner + run: ./gradlew install -x test + - name: Install grobid-ner + working-directory: ./grobid/grobid-ner + run: ./gradlew copyModules + - name: Build entity-fishing with Gradle + working-directory: ./entity-fishing run: ./gradlew build \ No newline at end of file From 66dd67f878213e6871e504ce44ece5fc4aba579e Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 16:50:29 +0900 Subject: [PATCH 04/12] minor corrections --- .github/workflows/ci-build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 6bd18d43..87fae100 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -24,7 +24,6 @@ jobs: uses: actions/checkout@v4 with: path: ./entity-fishing - - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v4 with: @@ -32,14 +31,14 @@ jobs: distribution: 'adopt' cache: 'gradle' - name: Build grobid - working-directory: ./grobid + working-directory: grobid run: ./gradlew install -x test - name: Build grobid-ner - working-directory: ./grobid-ner + working-directory: grobid/grobid-ner run: ./gradlew install -x test - name: Install grobid-ner - working-directory: ./grobid/grobid-ner + working-directory: grobid/grobid-ner run: ./gradlew copyModules - name: Build entity-fishing with Gradle - working-directory: ./entity-fishing + working-directory: entity-fishing run: ./gradlew build \ No newline at end of file From 554cecb43cd23c3cf60a59f91e9e176219f8b7b4 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 16:57:11 +0900 Subject: [PATCH 05/12] typo --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 87fae100..410662ff 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -38,7 +38,7 @@ jobs: run: ./gradlew install -x test - name: Install grobid-ner working-directory: grobid/grobid-ner - run: ./gradlew copyModules + run: ./gradlew copyModels - name: Build entity-fishing with Gradle working-directory: entity-fishing run: ./gradlew build \ No newline at end of file From 58ee51df616379c3dd0f9beae4f2f92e8ecb300f Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 17:02:35 +0900 Subject: [PATCH 06/12] pull the right grobid branch --- .github/workflows/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 410662ff..dc30da93 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,6 +14,7 @@ jobs: uses: actions/checkout@v4 with: repository: kermitt2/grobid + ref: release-0.8.1 path: ./grobid - name: Checkout grobid-ner uses: actions/checkout@v4 From c7bef1e7370f7ba337541f1ac8de0a2738f858c7 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 17:28:55 +0900 Subject: [PATCH 07/12] disable tests --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index dc30da93..d7d2299b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -42,4 +42,4 @@ jobs: run: ./gradlew copyModels - name: Build entity-fishing with Gradle working-directory: entity-fishing - run: ./gradlew build \ No newline at end of file + run: ./gradlew build -x tests \ No newline at end of file From 8b7362485d4559b377c28aa31d9a55f755caa6d8 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Thu, 4 Jul 2024 17:35:38 +0900 Subject: [PATCH 08/12] typo --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d7d2299b..eca2bf10 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -42,4 +42,4 @@ jobs: run: ./gradlew copyModels - name: Build entity-fishing with Gradle working-directory: entity-fishing - run: ./gradlew build -x tests \ No newline at end of file + run: ./gradlew build -x test \ No newline at end of file From 9a561f22750362d45642ff1d20021867a6f4e955 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sat, 4 Jan 2025 17:57:27 +0100 Subject: [PATCH 09/12] update grobid release --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index eca2bf10..1a00a285 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 with: repository: kermitt2/grobid - ref: release-0.8.1 + ref: 0.8.1 path: ./grobid - name: Checkout grobid-ner uses: actions/checkout@v4 From b63d4db7db1556b666e6edc3e9b2c983b7b7f3af Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sat, 4 Jan 2025 18:08:56 +0100 Subject: [PATCH 10/12] fix build --- build.gradle | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 4884c588..285b4c4f 100644 --- a/build.gradle +++ b/build.gradle @@ -65,6 +65,10 @@ dependencies { exclude(group: 'ch.qos.logback', module: 'logback-classic') } + implementation('ch.qos.logback:logback-classic:1.2.3'){ + exclude(module: 'com.google.guava:guava') + } + implementation 'black.ninia:jep:4.0.2' implementation 'org.apache.opennlp:opennlp-tools:1.9.1' implementation "joda-time:joda-time:2.9.9" @@ -76,7 +80,7 @@ dependencies { implementation group: 'org.wipo.analysers', name: 'wipo-analysers', version: '0.0.1' // Apache commons - implementation 'org.apache.commons:commons-collections4:4.1' + implementation 'org.apache.commons:commons-collections4:4.3' implementation 'org.apache.commons:commons-lang3:3.6' implementation 'commons-logging:commons-logging:1.2' implementation 'commons-io:commons-io:2.7' @@ -84,7 +88,7 @@ dependencies { implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13' implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.13' implementation group: 'org.apache.commons', name: 'commons-text', version: '1.1' - implementation group: 'com.google.guava', name: 'guava', version: '29.0-jre' + implementation "com.google.guava:guava:31.0.1-jre" // json and yaml implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.1' @@ -152,7 +156,7 @@ configurations.all { force 'xml-apis:xml-apis:1.4.01' } - exclude group: "ch.qos.logback", module: "logback-classic" +// exclude group: "ch.qos.logback", module: "logback-classic" exclude group: 'org.slf4j', module: "slf4j-log4j12" exclude group: 'org.slf4j', module: "slf4j-jdk14" exclude group: 'log4j', module: "log4j" From 79ce786e24d7d4eded621e9593ec9d4f287bfeb4 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sat, 4 Jan 2025 18:15:26 +0100 Subject: [PATCH 11/12] update documentation --- doc/build.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/build.rst b/doc/build.rst index 5645cf32..27e3b6ef 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -6,10 +6,12 @@ Install, build, run, and monitor Install, build, and run *********************** -*entity-fishing* requires JDK 1.8 or higher. It supports Linux-64. +*entity-fishing* requires JDK 1.11 or higher. +The official supported architecture/OS is Linux-64. -Mac OS environments should work fine, but it is *officially* not supported. -Please use a Linux-64 environment for any production works. Below, we make available the up-to-date and full binary index data for Linux-64 architecture. +Mac OS is not officially supported. Mac OS (Intel) should nevertheless work fine, but ARM does not work. +Please use a Linux-64 environment for any production works. +Below, we make available the up-to-date and full binary index data for Linux-64 architecture. Running the service requires at least 3GB of RAM for processing text inputs, but more RAM will be exploited if available for speeding up access to the compiled Wikidata and Wikipedia data (including Wikidata statements associated to entities) and for enabling high rate parallel processing. In case PDF are processed, a mimimum of 8GB is required due to additional PDF parsing and structuring requirements. For parallel processing of PDF exploiting multhreading (e.g. 10 parallel threads), 16GB is recommended. From defffe3cfac6481d4dbdaa138701a344ec6a880a Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sat, 4 Jan 2025 18:18:39 +0100 Subject: [PATCH 12/12] build the docker image automatically --- .github/workflows/ci-build.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 1a00a285..8f7b0aa5 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -42,4 +42,27 @@ jobs: run: ./gradlew copyModels - name: Build entity-fishing with Gradle working-directory: entity-fishing - run: ./gradlew build -x test \ No newline at end of file + run: ./gradlew build -x test + + + docker-build: + needs: [ build ] + runs-on: ubuntu-latest + + steps: + - name: Create more disk space + run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - uses: actions/checkout@v4 + - name: Build and push + id: docker_build + uses: mr-smithers-excellent/docker-build-push@v6 + with: + dockerfile: Dockerfile + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + image: lfoppiano/entity-fishing + registry: docker.io + pushImage: false + tags: latest-develop + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file