-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
72 lines (63 loc) · 2.03 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
ARG UBUNTU_VERSION=xenial
# Intermediate builder container
FROM ubuntu:${UBUNTU_VERSION} as builder
ARG UBUNTU_VERSION
ARG SRSLTE_REPO=https://github.com/srsLTE/srsLTE
ARG SRSLTE_CHECKOUT=master
# Install build dependencies
RUN echo "deb http://ppa.launchpad.net/ettusresearch/uhd/ubuntu \
${UBUNTU_VERSION} main" > /etc/apt/sources.list.d/uhd-latest.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6169358E \
&& apt-get update \
&& apt-get install -y \
build-essential \
git \
cmake \
libuhd-dev \
uhd-host \
libboost-all-dev \
# warning: pulled libboost-all-dev because libboost(-dev) alone left
# cmake unable to find boost when building the makefiles for srsUE
libvolk1-dev \
libfftw3-dev \
libmbedtls-dev \
libsctp-dev \
libconfig++-dev \
&& rm -rf /var/lib/apt/lists/*
# Clone repo and build
RUN mkdir /srslte \
&& cd /srslte \
&& git clone $SRSLTE_REPO srslte \
&& cd srslte \
&& git checkout $SRSLTE_CHECKOUT \
&& cd .. \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/srslte ../srslte \
&& make -j$(ncore) install
# Copy the examples over
RUN cd /srslte/build/lib/examples && cp $(ls | grep -vi make) /opt/srslte/bin
# Final container
FROM ubuntu:${UBUNTU_VERSION}
ARG UBUNTU_VERSION
# Install runtime dependencies
RUN echo "deb http://ppa.launchpad.net/ettusresearch/uhd/ubuntu \
${UBUNTU_VERSION} main" > /etc/apt/sources.list.d/uhd-latest.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6169358E \
&& apt-get update \
&& apt-get install -y \
uhd-host \
libuhd003 \
libvolk1.1 \
libfftw3-3 \
libmbedtls10 \
libsctp1 \
libconfig++9v5 \
&& python /usr/lib/uhd/utils/uhd_images_downloader.py \
&& rm -rf /var/lib/apt/lists/*
# Get compiled srsLTE
COPY --from=builder /opt/srslte /opt/srslte
# Set up paths
ENV LD_LIBRARY_PATH /opt/srslte/lib:$LD_LIBRARY_PATH
ENV PATH /opt/srslte/bin:$PATH
WORKDIR /conf