Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Dec 15, 2023
1 parent d35c7aa commit 3e3c96c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,12 @@ COPY gradlew grobid-quantities-source/
COPY .git grobid-quantities-source/.git
COPY localLibs grobid-quantities-source/localLibs

#RUN ls -l grobid-quantities-source/resources/models
#RUN ls -l grobid-quantities-source/resources/clearnlp/models/

# Preparing models
WORKDIR /opt/grobid/grobid-quantities-source
RUN rm -rf /opt/grobid/grobid-home/models/*
RUN ./gradlew clean assemble -x shadowJar --no-daemon --stacktrace --info
#RUN ./gradlew copyModels --info --no-daemon
RUN ./gradlew downloadTransformers --no-daemon --info --stacktrace && rm -f /opt/grobid/grobid-home/models/*.zip
RUN ls -l /opt/grobid/grobid-home/models/quantities-BidLSTM_CRF

# Preparing distribution
WORKDIR /opt/grobid
Expand All @@ -68,11 +64,9 @@ RUN apt-get update && \
apt-get -y --no-install-recommends install git wget

WORKDIR /opt/grobid
#RUN ls -l /opt/grobid/grobid-home

RUN mkdir -p /opt/grobid/grobid-quantities/resources/clearnlp/models /opt/grobid/grobid-quantities/resources/clearnlp/config
COPY --from=builder /opt/grobid/grobid-home/models ./grobid-home/models
#RUN ls -l /opt/grobid/grobid-home/models/quantities-BidLSTM_CRF
#RUN ls -l /opt/grobid/grobid-home/models/quantities-BERT_CRF
COPY --from=builder /opt/grobid/grobid-quantities ./grobid-quantities/
COPY --from=builder /opt/grobid/grobid-quantities-source/resources/config/config.yml ./grobid-quantities/resources/config/
COPY --from=builder /opt/grobid/grobid-quantities-source/resources/clearnlp/models/* ./grobid-quantities/resources/clearnlp/models/
Expand All @@ -90,11 +84,11 @@ WORKDIR /opt/grobid
ARG GROBID_VERSION
ENV GROBID_VERSION=${GROBID_VERSION:-latest}
ENV GROBID_QUANTITIES_OPTS "-Djava.library.path=/opt/grobid/grobid-home/lib/lin-64:/usr/local/lib/python3.8/dist-packages/jep --add-opens java.base/java.lang=ALL-UNNAMED"


# This code removes the fixed seeed in DeLFT to increase the uncertanty
#RUN sed -i '/seed(7)/d' /usr/local/lib/python3.8/dist-packages/delft/utilities/Utilities.py
#RUN sed -i '/from numpy\.random import seed/d' /usr/local/lib/python3.8/dist-packages/delft/utilities/Utilities.py


EXPOSE 8060 8061 5005

#CMD ["java", "-agentpath:/usr/local/jprofiler12.0.2/bin/linux-x64/libjprofilerti.so=port=8849", "-jar", "grobid-superconductors/grobid-quantities-${GROBID_VERSION}-onejar.jar", "server", "grobid-superconductors/config.yml"]
Expand Down

0 comments on commit 3e3c96c

Please sign in to comment.