|
a |
|
b/Dockerfile |
|
|
1 |
FROM continuumio/miniconda |
|
|
2 |
|
|
|
3 |
RUN apt-get update --allow-releaseinfo-change |
|
|
4 |
RUN mkdir -p /usr/share/man/man1 |
|
|
5 |
RUN apt-get install -y default-jre |
|
|
6 |
|
|
|
7 |
WORKDIR /app/chexpert-labeler |
|
|
8 |
|
|
|
9 |
RUN git clone https://github.com/ncbi-nlp/NegBio.git |
|
|
10 |
ENV PYTHONPATH=NegBio:$PYTHONPATH |
|
|
11 |
|
|
|
12 |
COPY environment.yml environment.yml |
|
|
13 |
RUN conda env create -f environment.yml |
|
|
14 |
|
|
|
15 |
# Copy chexpert-labeler (see .dockerignore) |
|
|
16 |
COPY . . |
|
|
17 |
RUN chmod +x ./entrypoint.sh |
|
|
18 |
|
|
|
19 |
RUN ./entrypoint.sh python -m nltk.downloader universal_tagset punkt wordnet |
|
|
20 |
RUN ./entrypoint.sh python -c "from bllipparser import RerankingParser; RerankingParser.fetch_and_load('GENIA+PubMed')" |
|
|
21 |
|
|
|
22 |
# Run labeler on sample reports. This will download and cache CoreNLP in the docker image. |
|
|
23 |
COPY sample_reports.csv . |
|
|
24 |
RUN ./entrypoint.sh python label.py --reports_path sample_reports.csv --output_path labeled_reports.csv --verbose |
|
|
25 |
|
|
|
26 |
ENTRYPOINT ["./entrypoint.sh"] |