-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.runtime
58 lines (56 loc) · 2.42 KB
/
Dockerfile.runtime
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
ARG UBUNTU_TAG=focal
FROM ubuntu:${UBUNTU_TAG} as ubuntu
ENV DEBIAN_FRONTEND noninteractive
ARG OPAE_VERSION=2.0.1-2
ENV OPAE_VERSION ${OPAE_VERSION}
FROM ubuntu as opae
RUN apt-get update && \
apt-get install -y \
g++ \
make\
cmake\
git\
uuid-dev\
libjson-c-dev\
libhwloc-dev \
python3-dev \
libtbb-dev \
lsb-release && \
git clone --single-branch --branch release/${OPAE_VERSION} https://github.com/OPAE/opae-sdk.git /opae-sdk && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCPACK_GENERATOR=DEB \
-DOPAE_BUILD_LIBOPAE_PY=Off \
-DOPAE_BUILD_LIBOPAEVFIO=Off \
-DOPAE_BUILD_PLUGIN_VFIO=Off \
-DOPAE_BUILD_LIBOPAEUIO=Off \
-DOPAE_BUILD_EXTRA_TOOLS=Off \
/opae-sdk && \
make -j package
FROM ubuntu
ARG ARROW_VERSION=3.0.0
ARG FLETCHER_VERSION=0.0.19
ARG FLETCHER_OPAE_VERSION=0.2.1
COPY --from=opae /opae-${OPAE_VERSION}.x86_64-libs.deb opae-${OPAE_VERSION}.x86_64-libs.deb
COPY --from=opae /opae-${OPAE_VERSION}.x86_64-devel.deb opae-${OPAE_VERSION}.x86_64-devel.deb
COPY --from=opae /opae-${OPAE_VERSION}.x86_64-tools.deb opae-${OPAE_VERSION}.x86_64-tools.deb
RUN apt-get update && \
# arrow
apt-get install -y curl wget lsb-release gnupg && \
wget https://apache.bintray.com/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb && \
dpkg -i apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb && \
apt-get update && \
apt-get install -y libarrow-dev=$ARROW_VERSION-1 && \
# opae
apt-get install -y uuid-dev libjson-c-dev && \
dpkg -i /opae-${OPAE_VERSION}.x86_64-libs.deb /opae-${OPAE_VERSION}.x86_64-devel.deb /opae-${OPAE_VERSION}.x86_64-tools.deb && \
# fletcher
wget https://github.com/abs-tudelft/fletcher/releases/download/${FLETCHER_VERSION}/fletcher_${FLETCHER_VERSION}-ubuntu$(lsb_release --release --short)_amd64.deb && \
dpkg -i fletcher_${FLETCHER_VERSION}-ubuntu$(lsb_release --release --short)_amd64.deb && \
# fletcher-opae
wget https://github.com/teratide/fletcher-opae/releases/download/${FLETCHER_OPAE_VERSION}/fletcher_opae_${FLETCHER_OPAE_VERSION}-ubuntu$(lsb_release --release --short)_amd64.deb && \
dpkg -i fletcher_opae_${FLETCHER_OPAE_VERSION}-ubuntu$(lsb_release --release --short)_amd64.deb && \
# clean-up
apt-get remove -y --purge curl wget lsb-release gnupg apache-arrow-archive-keyring cmake g++ make git && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* *.deb