split out dev apt dependencies (#32476)

* init

* add more extra packages

* update Dockerfile

* cleanup

* Update Dockerfile.openpilot_base

* needed to build

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e0fa26b1a4
pull/32103/head
macdoos 11 months ago committed by GitHub
parent d9c8f22082
commit 52dbb6eae4
  1. 10
      Dockerfile.openpilot_base
  2. 35
      tools/install_ubuntu_dependencies.sh

@ -13,14 +13,10 @@ ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
COPY tools/install_ubuntu_dependencies.sh /tmp/tools/ COPY tools/install_ubuntu_dependencies.sh /tmp/tools/
RUN cd /tmp && \ RUN INSTALL_EXTRA_PACKAGES=no /tmp/tools/install_ubuntu_dependencies.sh && \
tools/install_ubuntu_dependencies.sh && \ rm -rf /var/lib/apt/lists/* /tmp/* && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
# remove unused architectures from gcc for panda
cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \ cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \
rm -rf arm/ && \ rm -rf arm/ thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
# Add OpenCL # Add OpenCL
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \

@ -12,21 +12,17 @@ if [[ ! $(id -u) -eq 0 ]]; then
SUDO="sudo" SUDO="sudo"
fi fi
# Install packages present in all supported versions of Ubuntu # Install common packages
function install_ubuntu_common_requirements() { function install_ubuntu_common_requirements() {
$SUDO apt-get update $SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends \ $SUDO apt-get install -y --no-install-recommends \
autoconf \ autoconf \
build-essential \ build-essential \
ca-certificates \ ca-certificates \
casync \
clang \ clang \
cmake \
make \
cppcheck \ cppcheck \
libtool \ libtool \
gcc-arm-none-eabi \ gcc-arm-none-eabi \
bzip2 \
liblzma-dev \ liblzma-dev \
libarchive-dev \ libarchive-dev \
libbz2-dev \ libbz2-dev \
@ -62,9 +58,7 @@ function install_ubuntu_common_requirements() {
opencl-headers \ opencl-headers \
ocl-icd-libopencl1 \ ocl-icd-libopencl1 \
ocl-icd-opencl-dev \ ocl-icd-opencl-dev \
clinfo \
portaudio19-dev \ portaudio19-dev \
qml-module-qtquick2 \
qtmultimedia5-dev \ qtmultimedia5-dev \
qtlocation5-dev \ qtlocation5-dev \
qtpositioning5-dev \ qtpositioning5-dev \
@ -75,7 +69,18 @@ function install_ubuntu_common_requirements() {
libqt5serialbus5-dev \ libqt5serialbus5-dev \
libqt5x11extras5-dev \ libqt5x11extras5-dev \
libqt5opengl5-dev \ libqt5opengl5-dev \
libreadline-dev \ libreadline-dev
}
# Install extra packages
function install_extra_packages() {
echo "Installing extra packages..."
$SUDO apt-get install -y --no-install-recommends \
bzip2 \
clinfo \
casync \
cmake \
make \
libdw1 libdw1
} }
@ -125,7 +130,19 @@ if [ -f "/etc/os-release" ]; then
install_ubuntu_lts_latest_requirements install_ubuntu_lts_latest_requirements
fi fi
esac esac
# Install extra packages
if [[ -z "$INSTALL_EXTRA_PACKAGES" ]]; then
read -p "Base setup done. Do you want to install extra development packages? [Y/n]: " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then
INSTALL_EXTRA_PACKAGES="yes"
fi
fi
if [[ "$INSTALL_EXTRA_PACKAGES" == "yes" ]]; then
install_extra_packages
fi
else else
echo "No /etc/os-release in the system" echo "No /etc/os-release in the system. Make sure you're running on Ubuntu, or similar."
exit 1 exit 1
fi fi

Loading…
Cancel
Save