-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (36 loc) · 1.39 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
FROM rust:1.61-bullseye
MAINTAINER [email protected]
ADD VERSION .
RUN \
apt-get update &&\
apt-get install -y build-essential meson pkg-config libnuma-dev python3-pyelftools libpcap-dev libclang-dev python3-pip git vim net-tools rdma-core libibverbs1 libibverbs-dev
RUN mkdir /dpdk
WORKDIR /dpdk
RUN \
wget http://fast.dpdk.org/rel/dpdk-21.08.tar.xz &&\
tar --strip-components=1 -xJf dpdk-21.08.tar.xz &&\
ls /dpdk &&\
# meson --prefix=/dpdk build &&\
meson --prefix=/dpdk -D disable_drivers=net/mlx4 -D disable_drivers=net/mlx5 -Dcpu_instruction_set=generic build &&\
cd build &&\
ninja install &&\
ninja clean &&\
cd .. && rm dpdk-21.08.tar.xz &&\
ldconfig
WORKDIR /
RUN \
git clone http://github.com/stanford-esrg/retina.git && cd retina
COPY print_tls/ /retina/examples/print_tls/
WORKDIR /retina
RUN \
export DPDK_PATH=/dpdk &&\
export LD_LIBRARY_PATH=$DPDK_PATH/lib/x86_64-linux-gnu &&\
export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig &&\
sed -i '/default = \["mlx5"\]/d' core/Cargo.toml &&\
sed -i 's#"examples/basic",#"examples/basic","examples/print_tls",#' Cargo.toml &&\
cargo build --release &&\
rm -rf target/release/deps && rm -rf target/release/build && rm -rf target/release/incremental
WORKDIR /retina
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]