-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathDockerfile
138 lines (121 loc) · 5.57 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Final ODK image
# (built upon the odklite image)
ARG ODKLITE_TAG=latest
FROM obolibrary/odklite:${ODKLITE_TAG}
LABEL maintainer="[email protected]"
ENV PATH="/tools/apache-jena/bin:/usr/local/share/swi-prolog/pack/sparqlprog/bin:$PATH"
ARG ODK_VERSION 0.0.0
ENV ODK_VERSION=$ODK_VERSION
# Software versions
# Jena 5.x requires Java 17, so for now we are stuck with Jena 4.x
ENV JENA_VERSION=4.9.0
ENV KGCL_JAVA_VERSION=0.5.1
ENV SSSOM_JAVA_VERSION=1.1.1
ENV AMMONITE_VERSION=2.5.9
ENV SCALA_CLI_VERSION=1.5.4
ENV OWLTOOLS_VERSION=2020-04-06
# Avoid repeated downloads of script dependencies by mounting the local coursier cache:
# docker run -v $HOME/.coursier/cache/v1:/tools/.coursier-cache ...
ENV COURSIER_CACHE="/tools/.coursier-cache"
# Add NodeSource package repository (needed to get recent versions of Node)
COPY thirdpartykeys/nodesource.gpg /usr/share/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x jammy main" > /etc/apt/sources.list.d/nodesource.list
# Install tools provided by Ubuntu.
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
build-essential \
openssh-client \
openjdk-11-jdk-headless \
maven \
python3-dev \
subversion \
automake \
aha \
dos2unix \
libjson-perl \
libbusiness-isbn-perl \
pkg-config \
xlsx2csv \
gh \
nodejs \
npm \
graphviz \
python3-psycopg2 \
swi-prolog \
libpcre3
# Install run-time dependencies for Soufflé.
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
g++ \
libffi-dev \
libncurses5-dev \
libsqlite3-dev \
mcpp \
zlib1g-dev
# Copy everything that we have prepared in the builder image.
COPY --from=obolibrary/odkbuild:latest /staging/full /
# Install Konclude.
# On x86_64, we get it from a pre-built release from upstream; on arm64,
# we use a custom pre-built binary to which we just need to add the
# run-time dependencies (the binary is not statically linked).
ARG TARGETARCH
RUN test "x$TARGETARCH" = xamd64 && ( \
wget -nv https://github.com/konclude/Konclude/releases/download/v0.7.0-1138/Konclude-v0.7.0-1138-Linux-x64-GCC-Static-Qt5.12.10.zip \
-O /tools/Konclude.zip && \
unzip Konclude.zip && \
mv Konclude-v0.7.0-1138-Linux-x64-GCC-Static-Qt5.12.10/Binaries/Konclude /tools/Konclude && \
rm -rf Konclude-v0.7.0-1138-Linux-x64-GCC-Static-Qt5.12.10 && \
rm Konclude.zip \
) || ( \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
libqt5xml5 libqt5network5 libqt5concurrent5 && \
wget -nv https://incenp.org/files/softs/konclude/0.7/Konclude-v0.7.0-1138-Linux-arm64-GCC.zip \
-O /tools/Konclude.zip && \
unzip Konclude.zip && \
mv Konclude-v0.7.0-1138-Linux-arm64-GCC/Binaries/Konclude /tools/Konclude && \
rm -rf Konclude-v0.7.0-1138-Linux-arm64-GCC && \
rm Konclude.zip \
)
# Install OWLTOOLS.
RUN wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/owltools \
-O /tools/owltools && \
wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/ontology-release-runner \
-O /tools/ontology-release-runner && \
wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/owltools-oort-all.jar \
-O /tools/owltools-oort-all.jar && \
chmod +x /tools/owltools && \
chmod +x /tools/ontology-release-runner && \
chmod +x /tools/owltools-oort-all.jar
# Install Jena.
RUN wget -nv http://archive.apache.org/dist/jena/binaries/apache-jena-$JENA_VERSION.tar.gz -O- | tar xzC /tools && \
mv /tools/apache-jena-$JENA_VERSION /tools/apache-jena
# Install Ammonite
RUN wget -nv https://github.com/lihaoyi/Ammonite/releases/download/$AMMONITE_VERSION/2.13-$AMMONITE_VERSION \
-O /tools/amm && \
chmod 755 /tools/amm && \
java -cp /tools/amm ammonite.AmmoniteMain /dev/null
# Install Scala-CLI
RUN wget -nv https://github.com/VirtusLab/scala-cli/releases/download/v$SCALA_CLI_VERSION/scala-cli.jar \
-O /tools/scala-cli.jar && \
echo "#!/bin/bash" > /tools/scala-cli && \
echo "java -jar /tools/scala-cli.jar \"\$@\"" >> /tools/scala-cli && \
chmod 0755 /tools/scala-cli
# Install SPARQLProg.
RUN swipl -g "pack_install(sparqlprog, [interactive(false),global(true)])" -g halt
# Install obographviz
RUN npm install -g obographviz && \
chown -R root:root /usr/local/lib/node_modules
# Install OBO-Dashboard.
COPY scripts/obodash /tools
RUN chmod +x /tools/obodash && \
git clone --depth 1 https://github.com/OBOFoundry/OBO-Dashboard.git && \
cd OBO-Dashboard && \
python3 -m pip install -r requirements.txt --break-system-packages && \
echo " " >> Makefile && \
echo "build/robot.jar:" >> Makefile && \
echo " echo 'skipped ROBOT jar download.....' && touch \$@" >> Makefile && \
echo "" >> Makefile
# Install ROBOT plugins
RUN wget -nv -O /tools/sssom-cli https://github.com/gouttegd/sssom-java/releases/download/sssom-java-$SSSOM_JAVA_VERSION/sssom-cli && \
chmod +x /tools/sssom-cli && \
mkdir -p /tools/robot-plugins && \
wget -nv -O /tools/robot-plugins/sssom.jar https://github.com/gouttegd/sssom-java/releases/download/sssom-java-$SSSOM_JAVA_VERSION/sssom-robot-plugin-$SSSOM_JAVA_VERSION.jar && \
wget -nv -O /tools/robot-plugins/kgcl.jar https://github.com/gouttegd/kgcl-java/releases/download/kgcl-java-$KGCL_JAVA_VERSION/kgcl-robot-plugin-$KGCL_JAVA_VERSION.jar