forked from INCATools/ontology-development-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
104 lines (91 loc) · 3.83 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
# 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:/tools/sparqlprog/bin:$PATH"
ARG ODK_VERSION 0.0.0
ENV ODK_VERSION $ODK_VERSION
# 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 \
sqlite3 \
libjson-perl \
pkg-config \
xlsx2csv \
gh \
nodejs \
graphviz \
python3-psycopg2 \
swi-prolog
# 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 Jena.
RUN wget -nv http://archive.apache.org/dist/jena/binaries/apache-jena-4.6.1.tar.gz -O- | tar xzC /tools && \
mv /tools/apache-jena-4.6.1 /tools/apache-jena
# Install SPARQLProg.
RUN swipl -g "pack_install(sparqlprog, [interactive(false)])" -g halt && \
ln -sf /root/.local/share/swi-prolog/pack/sparqlprog /tools/
# Install obographviz
RUN npm install -g obographviz
# 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 && \
echo " " >> Makefile && \
echo "build/robot.jar:" >> Makefile && \
echo " echo 'skipped ROBOT jar download.....' && touch \$@" >> Makefile && \
echo "" >> Makefile
# Install relation-graph
ENV RG=2.3
ENV PATH "/tools/relation-graph/bin:$PATH"
RUN wget -nv https://github.com/balhoff/relation-graph/releases/download/v$RG/relation-graph-cli-$RG.tgz \
&& tar -zxvf relation-graph-cli-$RG.tgz \
&& mv relation-graph-cli-$RG /tools/relation-graph \
&& chmod +x /tools/relation-graph