-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (40 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
52 lines (40 loc) · 1.27 KB
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 ubuntu:24.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
libeigen3-dev \
libgtest-dev \
pybind11-dev \
python3 \
python3-dev \
python3-matplotlib \
python3-numpy \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \
&& cmake --build build --parallel \
&& cmake --install build --prefix /opt/libgnsspp \
&& py_site="$(find /opt/libgnsspp/lib -type d -path '*/site-packages' | head -n 1)" \
&& test -n "${py_site}" \
&& mkdir -p /opt/libgnsspp/lib/python3 \
&& ln -sf "${py_site}" /opt/libgnsspp/lib/python3/site-packages
FROM ubuntu:24.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
python3 \
python3-matplotlib \
python3-numpy \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /opt/libgnsspp /opt/libgnsspp
ENV PATH=/opt/libgnsspp/bin:${PATH}
ENV PYTHONPATH=/opt/libgnsspp/lib/python3/site-packages
WORKDIR /workspace
EXPOSE 8085
RUN gnss --help >/dev/null \
&& python3 -c "import libgnsspp" >/dev/null
ENTRYPOINT ["gnss"]
CMD ["--help"]