smaller docker image (#23469)

* save 2gb

* not used

* more cleanup

* little more

* wget too big

* follow

* needed for sim
pull/23493/head
Adeeb Shihadeh 2022-01-10 11:43:18 -08:00 committed by GitHub
parent 1a54d7f6ae
commit fa3055f280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 19 deletions

View File

@ -13,14 +13,20 @@ ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
ENV PIPENV_SYSTEM=1 ENV PIPENV_SYSTEM=1
ENV PYENV_VERSION=3.8.10
ENV PYENV_ROOT="/root/.pyenv"
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
COPY Pipfile Pipfile.lock .python-version update_requirements.sh /tmp/ COPY Pipfile Pipfile.lock .python-version update_requirements.sh /tmp/
COPY tools/ubuntu_setup.sh /tmp/tools/ COPY tools/ubuntu_setup.sh /tmp/tools/
RUN cd /tmp && \ RUN cd /tmp && \
tools/ubuntu_setup.sh && \ tools/ubuntu_setup.sh && \
rm -rf /tmp/* && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
pip uninstall -y pipenv rm -rf /tmp/* && \
rm -rf /root/.cache && \
pip uninstall -y pipenv && \
ENV PYENV_VERSION=3.8.10 # remove unused architectures from gcc for panda
ENV PYENV_ROOT="/root/.pyenv" cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH" rm -rf arm/ && \
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp

View File

@ -42,7 +42,7 @@ RUN pip install --upgrade pip && \
# get same tmux config used on NEOS for debugging # get same tmux config used on NEOS for debugging
RUN cd $HOME && \ RUN cd $HOME && \
wget https://raw.githubusercontent.com/commaai/eon-neos-builder/master/devices/eon/home/.tmux.conf curl -O https://raw.githubusercontent.com/commaai/eon-neos-builder/master/devices/eon/home/.tmux.conf
ENV PYTHONPATH $HOME/openpilot:${PYTHONPATH} ENV PYTHONPATH $HOME/openpilot:${PYTHONPATH}
RUN mkdir -p $HOME/openpilot RUN mkdir -p $HOME/openpilot

View File

@ -13,12 +13,12 @@ function install_ubuntu_common_requirements() {
sudo apt-get install -y --no-install-recommends \ sudo apt-get install -y --no-install-recommends \
autoconf \ autoconf \
build-essential \ build-essential \
ca-certificates \
clang \ clang \
cmake \ cmake \
make \ make \
cppcheck \ cppcheck \
libtool \ libtool \
libstdc++-arm-none-eabi-newlib \
gcc-arm-none-eabi \ gcc-arm-none-eabi \
bzip2 \ bzip2 \
liblzma-dev \ liblzma-dev \
@ -28,7 +28,6 @@ function install_ubuntu_common_requirements() {
libcapnp-dev \ libcapnp-dev \
curl \ curl \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
wget \
git \ git \
git-lfs \ git-lfs \
ffmpeg \ ffmpeg \
@ -50,13 +49,6 @@ function install_ubuntu_common_requirements() {
libsqlite3-dev \ libsqlite3-dev \
libusb-1.0-0-dev \ libusb-1.0-0-dev \
libzmq3-dev \ libzmq3-dev \
libsdl1.2-dev \
libsdl-image1.2-dev \
libsdl-mixer1.2-dev \
libsdl-ttf2.0-dev \
libsmpeg-dev \
libportmidi-dev \
libfreetype6-dev \
libsystemd-dev \ libsystemd-dev \
locales \ locales \
opencl-headers \ opencl-headers \
@ -64,10 +56,8 @@ function install_ubuntu_common_requirements() {
ocl-icd-opencl-dev \ ocl-icd-opencl-dev \
clinfo \ clinfo \
python-dev \ python-dev \
python3-pip \
qml-module-qtquick2 \ qml-module-qtquick2 \
qtmultimedia5-dev \ qtmultimedia5-dev \
qtwebengine5-dev \
qtlocation5-dev \ qtlocation5-dev \
qtpositioning5-dev \ qtpositioning5-dev \
libqt5sql5-sqlite \ libqt5sql5-sqlite \

View File

@ -27,7 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
mkdir /tmp/opencv_build && \ mkdir /tmp/opencv_build && \
cd /tmp/opencv_build && \ cd /tmp/opencv_build && \
wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.tar.gz && \ curl -L -O https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.tar.gz && \
tar -xvf ${OPENCV_VERSION}.tar.gz && \ tar -xvf ${OPENCV_VERSION}.tar.gz && \
mv opencv-${OPENCV_VERSION} OpenCV && \ mv opencv-${OPENCV_VERSION} OpenCV && \
cd OpenCV && mkdir build && cd build && \ cd OpenCV && mkdir build && cd build && \
@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
make install && \ make install && \
ldconfig && \ ldconfig && \
cd /tmp && rm -rf /tmp/opencv_build cd / && rm -rf /tmp/*