Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dockerfile for pip #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile.pip
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This Dockerfile contains a python environment with scispacy and the relevant models installed.

FROM python:3.6.8-jessie

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

WORKDIR /stage/scispacy

RUN pip install scispacy
RUN pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.1.0/en_core_sci_sm-0.1.0.tar.gz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably at least a be a variable, and echo what version is being tested or something.

RUN pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.1.0/en_core_sci_md-0.1.0.tar.gz
RUN pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.1.0/en_ner_craft_md-0.1.0.tar.gz
RUN pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.1.0/en_ner_bc5cdr_md-0.1.0.tar.gz
RUN pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.1.0/en_ner_bionlp13cg_md-0.1.0.tar.gz
RUN pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.1.0/en_ner_jnlpba_md-0.1.0.tar.gz

# TODO(Mark): Move this to a library test when we release a new version.
COPY test_pip_models.py test_pip_models.py

ENTRYPOINT ["python"]
17 changes: 17 additions & 0 deletions test_pip_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


import spacy


def test_scispacy_models_can_load():

small = spacy.load("en_core_sci_sm")
medium = spacy.load("en_core_sci_md")
craft = spacy.load("en_ner_craft_md")
jnlpba = spacy.load("en_ner_jnlpba_md")
bc5cdr = spacy.load("en_ner_bc5cdr_md")
bionlp = spacy.load("en_ner_bionlp13cg_md")
print("All models can load!")

if __name__ == "__main__":
test_scispacy_models_can_load()