-
Notifications
You must be signed in to change notification settings - Fork 6
/
tegra.Dockerfile
62 lines (57 loc) · 1.83 KB
/
tegra.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
# FROM registry.hub.docker.com/mdegans/gstcudaplugin:latest
ARG GSTCUDAPLUGIN_TAG="latest"
ARG REPO_BASE="registry.hub.docker.com/"
FROM ${REPO_BASE}mdegans/gstcudaplugin:${GSTCUDAPLUGIN_TAG}
ARG SRCDIR="/usr/src/nvalhalla"
# set up source dir and copy source
WORKDIR ${SRCDIR}
COPY meson.build COPYING VERSION ./
COPY docs ./docs/
COPY includes ./includes/
COPY models ./models/
COPY nvinfer_configs ./nvinfer_configs/
COPY scripts ./scripts/
COPY test ./test/
COPY src ./src/
# install build dependencies, build, install, and uninstall build deps
# (all in one layer so as not to increase size)
# yes a multi-stage build could also be used, this is the "old" way
# among other things in this layer, we break interactive login capability.
# if a development image is needed or your internet is slow, this layer
# should probably be split up and the above copies moved into the middle
# (after deps install, just before the build)
RUN apt-get update && apt-get install -y --no-install-recommends \
libgee-0.8-2 \
libgee-0.8-dev \
libglib2.0-dev \
libgstreamer1.0-dev \
libgstrtspserver-1.0-dev \
ninja-build \
python3-pip \
python3-setuptools \
valac \
&& pip3 install meson \
&& mkdir build \
&& cd build \
&& meson --prefix=/usr .. \
&& ninja \
&& ninja test \
&& ninja install \
&& ninja clean \
&& rm -rf ${SRCDIR} \
&& cd / \
&& pip3 uninstall -y meson \
&& apt-get purge -y --autoremove \
libgee-0.8-dev \
ninja-build \
python3-pip \
python3-setuptools \
valac \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /
# drop caps and run nvalhalla using the rtsp sink
# on Tegra, it seems we can't drop caps without unexplained
# ldconfig issues (likely related to the way nvidia-docker works on Tegra)
ENV G_MESSAGES_DEBUG="all"
EXPOSE 8554/tcp
ENTRYPOINT [ "nvalhalla" ]