Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
ARG GROBID_VERSION | ||
ARG GROBID_REPO=lfoppiano/grobid | ||
FROM ${GROBID_REPO}:${GROBID_VERSION} | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --yes \ | ||
python3-minimal python3-venv python3-pip \ | ||
openjdk-8-jdk-headless \ | ||
curl \ | ||
&& JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 pip3 install jep==3.8.2 \ | ||
&& apt-get remove --yes openjdk-8-jdk-headless \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# create virtual env (see also https://bugs.python.org/issue24875) | ||
ENV VENV=/opt/venv | ||
RUN python3 -m venv ${VENV} \ | ||
&& python3 -m venv --system-site-packages ${VENV} | ||
ENV VIRTUAL_ENV=${VENV} PYTHONUSERBASE=${VENV} PATH=${VENV}/bin:$PATH | ||
|
||
# install python build dependencies | ||
RUN pip install setuptools==41.0.1 wheel==0.33.4 | ||
|
||
# download and install delft | ||
ARG delft_repo=kermitt2/delft | ||
ARG delft_tag=master | ||
RUN curl --progress-bar --location \ | ||
"https://github.com/${delft_repo}/archive/${delft_tag}.tar.gz" \ | ||
--output "/tmp/${delft_tag}.tar.gz" \ | ||
&& tar -C "/opt" -xvf "/tmp/${delft_tag}.tar.gz" \ | ||
&& rm "/tmp/${delft_tag}.tar.gz" \ | ||
&& ln -s "/opt/delft-${delft_tag}" "/opt/delft" | ||
|
||
COPY requirements.delft.minimal.txt /opt/delft/ | ||
RUN pip install -r /opt/delft/requirements.delft.minimal.txt | ||
|
||
# enable delft | ||
RUN sed -i 's/^grobid.crf.engine.*/grobid.crf.engine=delft/' /opt/grobid/grobid-home/config/grobid.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
keras==2.2.4 | ||
numpy==1.16.1 | ||
pandas==0.22.0 | ||
bleach>=2.1.0 | ||
regex==2018.2.21 | ||
scikit-learn==0.19.1 | ||
tqdm==4.21 | ||
gensim==3.4.0 | ||
langdetect==1.0.7 | ||
textblob==0.15.1 | ||
h5py==2.7.1 | ||
unidecode==1.0.22 | ||
pydot==1.2.4 | ||
lmdb==0.94 | ||
keras-bert==0.39.0 | ||
tensorflow==1.12.0 |