Skip to content

Commit

Permalink
4883 task revert back to java 17 (#4885)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgauldie authored Sep 20, 2024
1 parent 160b2ef commit cb15ee8
Show file tree
Hide file tree
Showing 24 changed files with 147 additions and 181 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Check Generated Types
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-funman-taskrunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Create image and push
Expand Down Expand Up @@ -81,11 +81,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Create image and push
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-gollm-taskrunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Create image and push
Expand Down Expand Up @@ -81,11 +81,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Create image and push
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-mira-taskrunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Create image and push
Expand Down Expand Up @@ -81,11 +81,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Create image and push
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Build hmi-server using Makefile
Expand Down Expand Up @@ -87,11 +87,11 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v21
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 17
cache: gradle

- name: Build hmi-server using Makefile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

# Setup Java 21
- name: Setup Java v21
# Setup Java 17
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 21
java-version: 17
cache: gradle

# Start containers
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-taskrunner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:
- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

# Setup Java 21
- name: Setup Java v21
# Setup Java 17
- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 21
java-version: 17
cache: gradle

# Start containers
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ develop Terarium, you will need these as a prerequisite:

- [Yarn 4](https://yarnpkg.com/getting-started/install)
- [NodeJS 20](https://nodejs.org/en/download/current/)
- [JDK 21](https://adoptium.net/temurin)
- [JDK 17](https://adoptium.net/temurin)
- [Gradle 8](https://gradle.org/install/)
- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)

There are many ways/package managers to install these dependencies. We recommend using [Homebrew](https://brew.sh/) on MacOS.

```bash
brew tap homebrew/cask-versions
brew install openjdk@21
brew install openjdk@17
brew install gradle
brew install node
brew install yarnb
Expand All @@ -72,7 +72,7 @@ In the WSL Terminal input these commands to install the dependencies (Ubuntu ins
```shell
sudo apt-get upgrade
sudo apt-get install build-essential
sudo apt install openjdk-21-jre-headless
sudo apt install openjdk-17-jre-headless
sudo apt install gradle
sudo apt install python3-pip
python3 -m pip install --user ansible
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
64 changes: 25 additions & 39 deletions packages/equation_extraction/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
# Build the Spring Boot application
FROM python:3.11-slim AS equation_extraction_taskrunner_builder
FROM python:3.11-slim-bookworm AS equation_extraction_taskrunner_builder

###### DEV ONLY ######
#VVVVVVVVVVVVVVVVVVVVV

# These deps are installed only for use during local development

# Install OpenJDK21
# Install OpenJDK
RUN apt-get update && apt-get install -y --no-install-recommends \

Check failure on line 10 in packages/equation_extraction/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Docker Files / Lint Docker Files

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
build-essential \
git \
libgl1 \
libglib2.0-0 \
poppler-utils \
wget && \
rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.4%2B7/OpenJDK21U-jdk_x64_linux_hotspot_21.0.4_7.tar.gz && \
tar xvf OpenJDK21U-jdk_x64_linux_hotspot_21.0.4_7.tar.gz && \
mv jdk-21.0.4+7 /usr/local/jdk-21 && \
rm OpenJDK21U-jdk_x64_linux_hotspot_21.0.4_7.tar.gz

ENV JAVA_HOME=/usr/local/jdk-21
ENV PATH="$JAVA_HOME/bin:$PATH"
build-essential \
git \
libgl1 \
libglib2.0-0 \
poppler-utils \
wget \
openjdk-17-jdk-headless && \
rm -rf /var/lib/apt/lists/*

# Install equation-extraction
COPY ./packages/equation_extraction/equation-extraction-version.txt /extractionVersion.txt
RUN COMMIT_SHA="$(cat /extractionVersion.txt)" && \
echo "Using document_intelligence commit $COMMIT_SHA" && \
wget --progress=dot:giga -O equation-extraction.tar.gz "https://github.com/DARPA-ASKEM/document_intelligence/archive/${COMMIT_SHA}.tar.gz" && \
tar -zxvf equation-extraction.tar.gz && \
rm equation-extraction.tar.gz && \
mv document_intelligence-* document_intelligence
echo "Using document_intelligence commit $COMMIT_SHA" && \
wget --progress=dot:giga -O equation-extraction.tar.gz "https://github.com/DARPA-ASKEM/document_intelligence/archive/${COMMIT_SHA}.tar.gz" && \
tar -zxvf equation-extraction.tar.gz && \
rm equation-extraction.tar.gz && \
mv document_intelligence-* document_intelligence
WORKDIR /document_intelligence/document_intelligence/fast_latex
RUN pip3 install -r requirements.txt

Check failure on line 29 in packages/equation_extraction/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Docker Files / Lint Docker Files

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`

Expand All @@ -54,27 +47,20 @@ RUN mv /taskrunner/build/libs/*.jar .
RUN mv /terarium-1.0.0-SNAPSHOT.jar /taskrunner.jar

Check failure on line 47 in packages/equation_extraction/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Docker Files / Lint Docker Files

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.

# ------------------------------------------------------------------------------
FROM python:3.11-slim
FROM python:3.11-slim-bookworm

WORKDIR /

# Install OpenJRE21
# Install OpenJDK JRE
RUN apt-get update && apt-get install -y --no-install-recommends \

Check failure on line 55 in packages/equation_extraction/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Docker Files / Lint Docker Files

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
build-essential \
git \
libgl1 \
libglib2.0-0 \
poppler-utils \
wget && \
rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.4%2B7/OpenJDK21U-jre_x64_linux_hotspot_21.0.4_7.tar.gz && \
tar xvf OpenJDK21U-jre_x64_linux_hotspot_21.0.4_7.tar.gz && \
mv jdk-21.0.4+7-jre /usr/local/jre-21 && \
rm OpenJDK21U-jre_x64_linux_hotspot_21.0.4_7.tar.gz

ENV JAVA_HOME=/usr/local/jre-21
ENV PATH="$JAVA_HOME/bin:$PATH"
build-essential \
git \
libgl1 \
libglib2.0-0 \
poppler-utils \
wget \
openjdk-17-jre-headless && \
rm -rf /var/lib/apt/lists/*

# Copy the supervisord configuration file
COPY ./packages/equation_extraction/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
Expand Down
Loading

0 comments on commit cb15ee8

Please sign in to comment.