mirror of https://github.com/commaai/openpilot.git
smaller docker image (#23469)
* save 2gb
* not used
* more cleanup
* little more
* wget too big
* follow
* needed for sim
old-commit-hash: fa3055f280
This commit is contained in:
parent
54a4dece4d
commit
1ea1b9072a
|
@ -13,14 +13,20 @@ ENV LANGUAGE en_US:en
|
|||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
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 tools/ubuntu_setup.sh /tmp/tools/
|
||||
RUN cd /tmp && \
|
||||
tools/ubuntu_setup.sh && \
|
||||
rm -rf /tmp/* && \
|
||||
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
|
||||
ENV PYENV_ROOT="/root/.pyenv"
|
||||
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
|
||||
# remove unused architectures from gcc for panda
|
||||
cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \
|
||||
rm -rf arm/ && \
|
||||
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
|
||||
|
|
|
@ -42,7 +42,7 @@ RUN pip install --upgrade pip && \
|
|||
|
||||
# get same tmux config used on NEOS for debugging
|
||||
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}
|
||||
RUN mkdir -p $HOME/openpilot
|
||||
|
|
|
@ -13,12 +13,12 @@ function install_ubuntu_common_requirements() {
|
|||
sudo apt-get install -y --no-install-recommends \
|
||||
autoconf \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
clang \
|
||||
cmake \
|
||||
make \
|
||||
cppcheck \
|
||||
libtool \
|
||||
libstdc++-arm-none-eabi-newlib \
|
||||
gcc-arm-none-eabi \
|
||||
bzip2 \
|
||||
liblzma-dev \
|
||||
|
@ -28,7 +28,6 @@ function install_ubuntu_common_requirements() {
|
|||
libcapnp-dev \
|
||||
curl \
|
||||
libcurl4-openssl-dev \
|
||||
wget \
|
||||
git \
|
||||
git-lfs \
|
||||
ffmpeg \
|
||||
|
@ -50,13 +49,6 @@ function install_ubuntu_common_requirements() {
|
|||
libsqlite3-dev \
|
||||
libusb-1.0-0-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 \
|
||||
locales \
|
||||
opencl-headers \
|
||||
|
@ -64,10 +56,8 @@ function install_ubuntu_common_requirements() {
|
|||
ocl-icd-opencl-dev \
|
||||
clinfo \
|
||||
python-dev \
|
||||
python3-pip \
|
||||
qml-module-qtquick2 \
|
||||
qtmultimedia5-dev \
|
||||
qtwebengine5-dev \
|
||||
qtlocation5-dev \
|
||||
qtpositioning5-dev \
|
||||
libqt5sql5-sqlite \
|
||||
|
|
|
@ -27,7 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
mkdir /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 && \
|
||||
mv opencv-${OPENCV_VERSION} OpenCV && \
|
||||
cd OpenCV && mkdir build && cd build && \
|
||||
|
@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
make install && \
|
||||
ldconfig && \
|
||||
|
||||
cd /tmp && rm -rf /tmp/opencv_build
|
||||
cd / && rm -rf /tmp/*
|
||||
|
|
Loading…
Reference in New Issue