diff --git a/packages/funman/Dockerfile b/packages/funman/Dockerfile index a65a3f6048..7e96cd98d8 100644 --- a/packages/funman/Dockerfile +++ b/packages/funman/Dockerfile @@ -10,11 +10,14 @@ RUN ./gradlew bootJar # ------------------------------------------------------------------------------ # Funman-base, should contain dreal4, ibex, and python dependencies -FROM ghcr.io/darpa-askem/funman-base:latest-e5fb635757aa57007615a75371f55dd4a24851e0 +FROM ghcr.io/darpa-askem/funman-base:latest -# Install OpenJDK JRE +WORKDIR / + +# Install OpenJDK JRE and git RUN apt-get update && \ apt-get install -y --no-install-recommends openjdk-17-jre-headless && \ + apt-get install -y --no-install-recommends git && \ rm -rf /var/lib/apt/lists/* # Copy the Spring Boot fat JAR from the builder image @@ -24,24 +27,32 @@ COPY --from=taskrunner_builder /taskrunner/build/libs/*.jar /taskrunner.jar COPY ./packages/taskrunner/src/test/resources/echo.py /echo.py # Install funman-api -ADD https://api.github.com/repos/DARPA-ASKEM/funman-api/git/refs/heads/develop version.json -RUN git clone https://github.com/DARPA-ASKEM/funman-api.git && \ - cd funman-api && \ - pip install . && \ - pip install auxiliary_packages/funman_dreal && \ - pip install auxiliary_packages/funman_demo +RUN echo "Cache bust so we can always pull latest Funman" $(date -u) +COPY ./packages/funman/funman-version.txt /funmanVersion.txt + +RUN git clone https://github.com/DARPA-ASKEM/funman-api.git + +WORKDIR /funman-api +RUN COMMIT_SHA=$(cat /funmanVersion.txt) && \ + echo "Using FUNMAN commit $COMMIT_SHA" && \ + git reset --hard $COMMIT_SHA +RUN pip install --no-cache-dir . && \ + pip install --no-cache-dir auxiliary_packages/funman_dreal && \ + pip install --no-cache-dir auxiliary_packages/funman_demo # Install taskrunner +WORKDIR / COPY ./packages/taskrunner/setup.py /taskrunner/setup.py COPY ./packages/taskrunner/taskrunner.py /taskrunner/taskrunner.py + WORKDIR /taskrunner -RUN pip install -e . +RUN pip install --no-cache-dir -e . # Install funman tasks COPY ./packages/funman /funman_tasks + WORKDIR /funman_tasks -RUN pip install -e . +RUN pip install --no-cache-dir -e . WORKDIR / - CMD ["java", "-jar", "taskrunner.jar"] diff --git a/packages/funman/funman-version.txt b/packages/funman/funman-version.txt new file mode 100644 index 0000000000..bad8f74160 --- /dev/null +++ b/packages/funman/funman-version.txt @@ -0,0 +1 @@ +ff7051312955710c3e22b2a0cef85625b09fa461 diff --git a/packages/gollm/Dockerfile b/packages/gollm/Dockerfile index 23911e4f5f..b527331ab4 100644 --- a/packages/gollm/Dockerfile +++ b/packages/gollm/Dockerfile @@ -14,9 +14,10 @@ FROM python:3.10-slim WORKDIR / -# Install OpenJDK JRE +# Install OpenJDK JRE and wget RUN apt-get update && \ apt-get install -y --no-install-recommends openjdk-17-jre-headless && \ + apt-get install -y --no-install-recommends wget && \ rm -rf /var/lib/apt/lists/* # Copy the Spring Boot fat JAR from the builder image @@ -25,29 +26,33 @@ COPY --from=taskrunner_builder /taskrunner/build/libs/*.jar /taskrunner.jar # Copy the echo script for testing COPY ./packages/taskrunner/src/test/resources/echo.py /echo.py -# Install wget -RUN apt-get update && \ - apt-get install -y --no-install-recommends wget && \ - rm -rf /var/lib/apt/lists/* - +# Install GoLLM RUN echo "Cache bust so we can always pull latest GoLLM" $(date -u) -RUN wget -O gollm.tar.gz https://github.com/DARPA-ASKEM/GoLLM/archive/refs/heads/main.tar.gz && \ - tar -zxvf gollm.tar.gz && \ - mv GoLLM-* GoLLM && \ - cd /GoLLM && \ - pip install -e . +COPY ./packages/gollm/gollm-version.txt /gollmVersion.txt +RUN COMMIT_SHA=$(cat /gollmVersion.txt) && \ + echo "Using GoLLM commit $COMMIT_SHA" && \ + wget -O gollm.tar.gz https://github.com/DARPA-ASKEM/GoLLM/archive/${COMMIT_SHA}.tar.gz + +RUN tar -zxvf gollm.tar.gz && \ + rm gollm.tar.gz +RUN mv GoLLM-* GoLLM + +WORKDIR /GoLLM +RUN pip install --no-cache-dir -e . # Install taskrunner +WORKDIR / COPY ./packages/taskrunner/setup.py /taskrunner/setup.py COPY ./packages/taskrunner/taskrunner.py /taskrunner/taskrunner.py + WORKDIR /taskrunner -RUN pip install -e . +RUN pip install --no-cache-dir -e . # Install GoLLM tasks COPY ./packages/gollm /gollm_task + WORKDIR /gollm_task -RUN pip install -e . +RUN pip install --no-cache-dir -e . WORKDIR / - CMD ["java", "-jar", "taskrunner.jar"] diff --git a/packages/gollm/gollm-version.txt b/packages/gollm/gollm-version.txt new file mode 100644 index 0000000000..ec3e4d9751 --- /dev/null +++ b/packages/gollm/gollm-version.txt @@ -0,0 +1 @@ +468f7863d0d63f005d6dd1564cfadaecdbe04180 diff --git a/packages/mira/Dockerfile b/packages/mira/Dockerfile index d53fa50385..db70ed6c30 100644 --- a/packages/mira/Dockerfile +++ b/packages/mira/Dockerfile @@ -14,7 +14,7 @@ FROM python:3.10-slim WORKDIR / -# Install OpenJDK JRE and git +# Install OpenJDK JRE and wget RUN apt-get update && \ apt-get install -y --no-install-recommends openjdk-17-jre-headless && \ apt-get install -y --no-install-recommends wget && \ @@ -28,23 +28,31 @@ COPY ./packages/taskrunner/src/test/resources/echo.py /echo.py # Install Mira RUN echo "Cache bust so we can always pull latest MIRA" $(date -u) -RUN wget -O mira.tar.gz https://github.com/gyorilab/mira/archive/refs/heads/main.tar.gz && \ - tar -zxvf mira.tar.gz && \ - mv mira-* mira && \ - cd /mira && \ - pip install -e .[sbml,biomodels] +COPY ./packages/mira/mira-version.txt /miraVersion.txt +RUN COMMIT_SHA=$(cat /miraVersion.txt) && \ + echo "Using MIRA commit $COMMIT_SHA" && \ + wget -O mira.tar.gz https://github.com/gyorilab/mira/archive/${COMMIT_SHA}.tar.gz + +RUN tar -zxvf mira.tar.gz && \ + rm mira.tar.gz +RUN mv -v mira-* mira + +WORKDIR /mira +RUN pip install --no-cache-dir -e .[sbml,biomodels] # Install taskrunner +WORKDIR / COPY ./packages/taskrunner/setup.py /taskrunner/setup.py COPY ./packages/taskrunner/taskrunner.py /taskrunner/taskrunner.py + WORKDIR /taskrunner -RUN pip install -e . +RUN pip install --no-cache-dir -e . # Install Mira tasks COPY ./packages/mira /mira_task + WORKDIR /mira_task -RUN pip install -e . +RUN pip install --no-cache-dir -e . WORKDIR / - CMD ["java", "-jar", "taskrunner.jar"] diff --git a/packages/mira/mira-version.txt b/packages/mira/mira-version.txt new file mode 100644 index 0000000000..223031de4a --- /dev/null +++ b/packages/mira/mira-version.txt @@ -0,0 +1 @@ +7f7dc2a9f811b20bdcfd30a4b5209bb8cc7368b6