2024-04-29 06:32:18 +08:00
|
|
|
FROM ubuntu:24.04
|
|
|
|
|
2024-08-19 02:40:54 +08:00
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
ENV PYTHONPATH=/tmp/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
|
|
|
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 \
|
2019-09-26 17:07:03 +08:00
|
|
|
libffi-dev \
|
2019-04-10 05:09:18 +08:00
|
|
|
libusb-1.0-0 \
|
2024-04-29 06:32:18 +08:00
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
2022-11-04 08:24:28 +08:00
|
|
|
&& 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/ && \
|
2024-09-26 11:14:12 +08:00
|
|
|
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp && \
|
|
|
|
apt-get update && apt-get install -y clang-17 && \
|
|
|
|
ln -s $(which clang-17) /usr/bin/clang
|
2019-04-10 05:09:18 +08:00
|
|
|
|
2024-09-26 12:56:09 +08:00
|
|
|
RUN apt-get update && apt-get install -y curl && \
|
|
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/mull-project/mull-stable/setup.deb.sh' | bash && \
|
|
|
|
apt-get update && apt-get install -y mull-17
|
|
|
|
|
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-08-19 03:01:17 +08:00
|
|
|
COPY setup.py __init__.py $PYTHONPATH/panda/
|
|
|
|
COPY python/__init__.py $PYTHONPATH/panda/python/
|
|
|
|
RUN pip3 install --break-system-packages --no-cache-dir $PYTHONPATH/panda/[dev]
|
|
|
|
|
2024-08-19 02:40:54 +08:00
|
|
|
# TODO: this should be a "pip install" or not even in this repo at all
|
|
|
|
RUN git config --global --add safe.directory $PYTHONPATH/panda
|
|
|
|
ENV OPENDBC_REF="5ed7a834a4e0e24c3968dd1e98ceb4b9d5f9791a"
|
2024-08-19 03:01:17 +08:00
|
|
|
RUN cd /tmp/ && \
|
2024-08-19 02:40:54 +08:00
|
|
|
git clone --depth 1 https://github.com/commaai/opendbc opendbc_repo && \
|
|
|
|
cd opendbc_repo && git fetch origin $OPENDBC_REF && git checkout FETCH_HEAD && rm -rf .git/ && \
|
|
|
|
pip3 install --break-system-packages --no-cache-dir Cython numpy && \
|
|
|
|
scons -j8 --minimal opendbc/ && \
|
|
|
|
ln -s $PWD/opendbc $PYTHONPATH/opendbc
|
2022-12-09 08:14:22 +08:00
|
|
|
|
|
|
|
# for Jenkins
|
|
|
|
COPY README.md panda.tar.* /tmp/
|
2024-08-19 03:01:17 +08:00
|
|
|
RUN mkdir -p /tmp/pythonpath/panda && \
|
2024-08-19 02:40:54 +08:00
|
|
|
tar -xvf /tmp/panda.tar.gz -C /tmp/pythonpath/panda/ || true
|