Permalink
Browse files

[#58] added species

  • Loading branch information...
1 parent 9a9db37 commit 4a2210af47dad051b65e1c17dddea1c401be9d0b @jnguyenx jnguyenx committed Mar 10, 2017
Showing with 19 additions and 5 deletions.
  1. +8 −2 Dockerfile
  2. +11 −3 README.md
View
@@ -8,6 +8,8 @@
# Pull base image.
FROM ubuntu:16.04
+ARG species=all
+
RUN apt-get -y update && apt-get install -y software-properties-common python-software-properties
# Install Java.
@@ -27,8 +29,12 @@ WORKDIR /data
ADD owlsim-services/target/owlsim-services-3.0-SNAPSHOT.jar /data/
ADD configuration-samples/configuration-all.yaml /data/configuration.yaml
-ADD http://ci.monarchinitiative.org/view/dev/job/create-owlsim-files-on-dev/lastSuccessfulBuild/artifact/server/all.owl /data/
-ADD https://raw.githubusercontent.com/monarch-initiative/monarch-owlsim-data/master/data/Homo_sapiens/Hs_disease_phenotype.txt /data/
+RUN if [ $species = "human" ]; \
+ then \
+ wget https://data.monarchinitiative.org/owl/all-hp.owl -O /data/all.owl; \
+ else \
+ wget http://ci.monarchinitiative.org/view/dev/job/create-owlsim-files-on-dev/lastSuccessfulBuild/artifact/server/all.owl -O /data/all.owl; \
+ fi
CMD java -jar /data/owlsim-services-3.0-SNAPSHOT.jar server /data/configuration.yaml
View
@@ -64,10 +64,18 @@ http://localhost:8080/api/match/jaccard?id=X:heart-morphology&id=X:brain-morphol
## Build with Docker
-Run those commands from the root directory:
+Run those commands from the root directory (with Docker >= 1.9):
```
mvn package
-docker build -t owlsim .
-docker run -p 8080:8080 owlsim
+docker build -t owlsim-all . # by default contains all the species
+docker run -p 8080:8080 owlsim-all
+```
+
+To restrict to specific species:
+
+```
+docker build --build-arg species=all -t owlsim-all . # default if no args is provided or not matching any species
+docker build --build-arg species=human -t owlsim-human
+
```

0 comments on commit 4a2210a

Please sign in to comment.