forked from ouster-lidar/ouster-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (51 loc) · 1.47 KB
/
Dockerfile
File metadata and controls
60 lines (51 loc) · 1.47 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
53
54
55
56
57
58
59
60
ARG BASE="ubuntu:20.04"
FROM ${BASE}
ENV DEBIAN_FRONTEND=noninteractive \
BUILD_HOME=/var/lib/build
# Set up non-root build user and environment
ARG BUILD_UID=1000
ARG BUILD_GID=${BUILD_UID}
# Install build dependencies
RUN set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
doxygen \
# SDK deps \
libeigen3-dev \
libpcap-dev \
libtins-dev \
libcurl4-openssl-dev \
libglfw3-dev \
libpng-dev \
libflatbuffers-dev \
gfortran \
# Python deps
python3-dev \
python3-pip \
python3-venv \
ccache \
libxml2-utils \
curl \
# Install any additional available cpython versions for testing
'python3.(8|9|10)-dev' \
wget \
&& rm -rf /var/lib/apt/lists
# Set up non-root build user and environment
ARG BUILD_UID=1000
ARG BUILD_GID=${BUILD_UID}
RUN set -xe \
&& groupadd -g ${BUILD_GID} build \
&& useradd -u ${BUILD_UID} -d ${BUILD_HOME} -rm -s /bin/bash -g build build \
# hack: allow the build user to install into /usr/local to avoid using venv for uv
&& chown -R ${BUILD_UID}:${BUILD_GID} /usr/local
USER build:build
ENV PATH="${PATH}:${BUILD_HOME}/.local/bin" \
OUSTER_SDK_PATH="/opt/ouster-sdk"
WORKDIR ${BUILD_HOME}
# Install uv
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.8.19/uv-installer.sh | sh
# Populate source dir
COPY python/docker_install_reqs.sh python/setup.py python/requirements.txt ${OUSTER_SDK_PATH}/python/
RUN ${OUSTER_SDK_PATH}/python/docker_install_reqs.sh