forked from maszhongming/ReactionMiner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (37 loc) · 1.31 KB
/
Dockerfile
File metadata and controls
49 lines (37 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime
# FIXME: Temporary workaround for NFS file permissions issues
USER root
###################
# pdf2text #
###################
# Install s2orc
COPY s2orc-doc2json ./s2orc-doc2json
# Setup conda env + doc2json
RUN conda create -n doc2json python=3.8 pytest && conda clean --all -y
SHELL ["conda", "run", "-n", "doc2json", "/bin/bash", "-c"]
WORKDIR /workspace/s2orc-doc2json
RUN pip install -r ./requirements.txt --no-cache-dir
RUN python setup.py develop
# Copy in pdf2text python scripts
WORKDIR /workspace
COPY pdf2text ./pdf2text
###################
# ReactionMiner #
###################
WORKDIR /workspace
# Set up conda env
COPY ./environment.docker.yml .
RUN conda env update -n base -f environment.docker.yml && conda clean --all -y
# Install other Python dependencies
RUN conda run -n base python -m spacy download en_core_web_sm
# Add ReactionMiner Python scripts
COPY extraction ./extraction
COPY segmentation ./segmentation
# pdf2text is needed by extraction for config.py
COPY pdf2text/config.py ./extraction/config.py
COPY chemscraper ./chemscraper
COPY run_reactionminer.py ./run_reactionminer.py
COPY run_chemscraper.py ./run_chemscraper.py
# Run our docker entrypoint to execute the full workflow
COPY entrypoint.sh ./entrypoint.sh
CMD [ "./entrypoint.sh" ]