2024-04-29 06:32:18 +08:00
|
|
|
FROM ubuntu:24.04
|
|
|
|
|
2019-04-10 05:09:18 +08:00
|
|
|
ENV PYTHONUNBUFFERED 1
|
2022-11-04 08:24:28 +08:00
|
|
|
ENV PYTHONPATH /tmp/openpilot:$PYTHONPATH
|
2019-04-10 05:09:18 +08:00
|
|
|
|
2020-10-24 14:14:58 +08:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2022-11-04 08:24:28 +08:00
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2024-04-29 06:32:18 +08:00
|
|
|
make \
|
2019-04-10 05:09:18 +08:00
|
|
|
bzip2 \
|
2020-10-24 14:14:58 +08:00
|
|
|
ca-certificates \
|
2022-11-04 08:24:28 +08:00
|
|
|
capnproto \
|
|
|
|
clang \
|
2019-04-10 05:09:18 +08:00
|
|
|
g++ \
|
2022-11-04 08:24:28 +08:00
|
|
|
gcc-arm-none-eabi libnewlib-arm-none-eabi \
|
2019-04-10 05:09:18 +08:00
|
|
|
git \
|
2022-11-04 08:24:28 +08:00
|
|
|
libarchive-dev \
|
2019-09-26 17:07:03 +08:00
|
|
|
libbz2-dev \
|
2022-11-04 08:24:28 +08:00
|
|
|
libcapnp-dev \
|
2019-09-26 17:07:03 +08:00
|
|
|
libffi-dev \
|
2019-04-10 05:09:18 +08:00
|
|
|
libtool \
|
|
|
|
libusb-1.0-0 \
|
2022-11-04 08:24:28 +08:00
|
|
|
libzmq3-dev \
|
|
|
|
locales \
|
|
|
|
opencl-headers \
|
|
|
|
ocl-icd-opencl-dev \
|
2024-04-29 06:32:18 +08:00
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
python-is-python3 \
|
2022-11-04 08:24:28 +08:00
|
|
|
zlib1g-dev \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* && \
|
2024-04-29 06:32:18 +08:00
|
|
|
apt clean && \
|
|
|
|
cd /usr/lib/gcc/arm-none-eabi/* && \
|
2022-11-04 08:24:28 +08:00
|
|
|
rm -rf arm/ && \
|
|
|
|
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
|
2019-04-10 05:09:18 +08:00
|
|
|
|
2019-09-26 10:00:57 +08:00
|
|
|
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US:en
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2019-04-10 05:09:18 +08:00
|
|
|
COPY requirements.txt /tmp/
|
2024-04-29 06:32:18 +08:00
|
|
|
RUN pip3 install --break-system-packages --no-cache-dir -r /tmp/requirements.txt
|
2022-11-04 08:24:28 +08:00
|
|
|
|
|
|
|
ENV CPPCHECK_DIR=/tmp/cppcheck
|
|
|
|
COPY tests/misra/install.sh /tmp/
|
2024-04-29 06:32:18 +08:00
|
|
|
RUN /tmp/install.sh && rm -rf $CPPCHECK_DIR/.git/
|
2024-04-23 01:28:53 +08:00
|
|
|
ENV SKIP_CPPCHECK_INSTALL=1
|
2019-04-10 05:09:18 +08:00
|
|
|
|
2024-04-29 06:32:18 +08:00
|
|
|
ENV CEREAL_REF="861144c136c91f70dcbc652c2ffe99f57440ad47"
|
|
|
|
ENV OPENDBC_REF="e0d4be4a6215d44809718dc84efe1b9f0299ad63"
|
2022-12-09 08:14:22 +08:00
|
|
|
|
2024-04-29 06:32:18 +08:00
|
|
|
RUN git config --global --add safe.directory /tmp/openpilot/panda
|
|
|
|
RUN mkdir -p /tmp/openpilot/ && \
|
|
|
|
cd /tmp/openpilot/ && \
|
|
|
|
git clone --depth 1 https://github.com/commaai/cereal && \
|
|
|
|
git clone --depth 1 https://github.com/commaai/opendbc && \
|
|
|
|
cd cereal && git fetch origin $CEREAL_REF && git checkout FETCH_HEAD && rm -rf .git/ && cd .. && \
|
|
|
|
cd opendbc && git fetch origin $OPENDBC_REF && git checkout FETCH_HEAD && rm -rf .git/ && cd .. && \
|
|
|
|
cp -pR opendbc/SConstruct opendbc/site_scons/ . && \
|
|
|
|
pip3 install --break-system-packages --no-cache-dir -r opendbc/requirements.txt && \
|
|
|
|
scons -j8 --minimal opendbc/ cereal/
|
2022-12-09 08:14:22 +08:00
|
|
|
|
|
|
|
# for Jenkins
|
|
|
|
COPY README.md panda.tar.* /tmp/
|
|
|
|
RUN mkdir /tmp/openpilot/panda && \
|
|
|
|
tar -xvf /tmp/panda.tar.gz -C /tmp/openpilot/panda/ || true
|