-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
84 lines (65 loc) · 2.92 KB
/
Dockerfile
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM python:3.6
VOLUME /logs
VOLUME /out
ENV WORKSPACE=/opt/VFB
ENV VOLUMEDATA=/out
ENV VALIDATE=true
ENV VALIDATESHEX=true
ENV VALIDATESHACL=true
ENV REMOVE_EMBARGOED_DATA=true
ENV REMOVE_UNSAT_CAUSING_AXIOMS=true
# These are potential causes of unsatisfiability:
# DisjointClasses DisjointUnion DifferentIndividuals NegativeObjectPropertyAssertion
# NegativeDataPropertyAssertion FunctionalObjectProperty InverseFunctionalObjectProperty
# ReflexiveObjectProperty IrrefexiveObjectProperty ObjectPropertyDomain ObjectPropertyRange
# DisjointObjectProperties FunctionalDataProperty DataPropertyDomain DataPropertyRange DisjointDataProperties"
ENV UNSAT_AXIOM_TYPES="DisjointClasses DisjointUnion DifferentIndividuals DisjointObjectProperties DisjointDataProperties"
# FOR STAGING, CURRENTLY ONLY prod and dev are supported. If set to dev
# Datasets will only be embargoed if they are not staged.
ENV STAGING=prod
# ENV CHUNK_SIZE=1000
# ENV PING_SLEEP=120s
# ENV BUILD_OUTPUT=${WORKSPACE}/build.out
ENV PATH "/opt/VFB/:/opt/VFB/shacl/bin:$PATH"
ENV KBserver=http://192.168.0.1:7474
ENV KBuser=neo4j
ENV KBpassword=password
ENV GITBRANCH=kbold2new
RUN pip3 install wheel requests psycopg2 pandas base36
RUN apt-get -qq update || apt-get -qq update && \
apt-get -qq -y install git curl wget default-jdk pigz maven libpq-dev python-dev tree gawk
RUN mkdir $WORKSPACE
###### ROBOT ######
ENV ROBOT v1.7.0
ENV ROBOT_ARGS -Xmx20G
ARG ROBOT_JAR=https://github.com/ontodev/robot/releases/download/$ROBOT/robot.jar
ENV ROBOT_JAR ${ROBOT_JAR}
RUN wget $ROBOT_JAR -O $WORKSPACE/robot.jar && \
wget https://raw.githubusercontent.com/ontodev/robot/$ROBOT/bin/robot -O $WORKSPACE/robot && \
chmod +x $WORKSPACE/robot && chmod +x $WORKSPACE/robot.jar
###### SHACL ######
ENV SHACL_VERSION 1.3.2
ARG SHACL_ZIP=https://repo1.maven.org/maven2/org/topbraid/shacl/$SHACL_VERSION/shacl-$SHACL_VERSION-bin.zip
ENV SHACL_ZIP ${SHACL_ZIP}
RUN wget $SHACL_ZIP -O $WORKSPACE/shacl.zip && \
unzip $WORKSPACE/shacl.zip -d $WORKSPACE && \
mv $WORKSPACE/shacl-$SHACL_VERSION $WORKSPACE/shacl && \
rm $WORKSPACE/shacl.zip && chmod +x $WORKSPACE/shacl/bin/shaclvalidate.sh && chmod +x $WORKSPACE/shacl/bin/shaclinfer.sh
RUN ls -l $WORKSPACE/shacl
###### SHEX ######
ENV SHEX_VERSION 1.1
# RUN cd $WORSKPACE && git clone https://github.com/iovka/shex-java.git && \
# cd shex-java/shex && mvn clean package && \
# mvn dependency:build-classpath -Dmdep.includeScope=runtime -Dmdep.outputFile=cp.txt
###### VFB Neo4j Python Libraries ########
ENV PYTHONPATH=${WORKSPACE}/VFB_neo4j/src/
RUN cd "${WORKSPACE}" && git clone --quiet https://github.com/VirtualFlyBrain/VFB_neo4j.git && tree ${WORKSPACE}
###### Copy pipeline files ########
COPY process.sh $WORKSPACE/process.sh
RUN chmod +x $WORKSPACE/process.sh
COPY vfb*.txt $WORKSPACE/
COPY /sparql $WORKSPACE/sparql
COPY /shacl $WORKSPACE/shacl
COPY /shex $WORKSPACE/shex
# COPY /test.ttl $WORKSPACE/
CMD ["/opt/VFB/process.sh"]