openpilot0/Dockerfile.openpilot_ci

106 lines
3.0 KiB
Docker

FROM ubuntu:16.04
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y \
build-essential \
bzip2 \
clang \
cmake \
curl \
ffmpeg \
git \
libarchive-dev \
libbz2-dev \
libcurl4-openssl-dev \
libeigen3-dev \
libffi-dev \
libglew-dev \
libgles2-mesa-dev \
libglfw3-dev \
libglib2.0-0 \
liblzma-dev \
libmysqlclient-dev \
libomp-dev \
libopencv-dev \
libssl-dev \
libsqlite3-dev \
libusb-1.0-0-dev \
libzmq5-dev \
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
python-dev \
python-pip \
screen \
sudo \
vim \
wget
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
COPY ./external/opencl /tmp/openpilot/external/opencl
RUN dpkg -i /tmp/openpilot/external/opencl/*.deb
RUN mkdir -p /etc/OpenCL/vendors; cp /tmp/openpilot/external/opencl/intel.icd /etc/OpenCL/vendors/intel.icd
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
RUN pyenv install 3.7.3
RUN pyenv global 3.7.3
RUN pyenv rehash
RUN pip install pipenv==2018.11.26
COPY Pipfile /tmp/
COPY Pipfile.lock /tmp/
RUN python --version
RUN cd /tmp && pipenv install --system --deploy
# Install subset of dev dependencies needed for CI
RUN pip install matplotlib==3.1.1 dictdiffer==0.8.0 fastcluster==1.1.25 aenum==2.2.1 scipy==1.3.1 lru-dict==1.1.6 tenacity==5.1.1 azure-common==1.1.23 azure-nspkg==3.0.2 azure-storage-blob==2.1.0 azure-storage-common==2.1.0 azure-storage-nspkg==3.1.0 pycurl==7.43.0.3
RUN mkdir -p /home/batman
ENV HOME /home/batman
ENV PATH /tmp/openpilot/external/capnp/bin/:${PATH}
ENV PYTHONPATH /tmp/openpilot:${PYTHONPATH}
COPY ./apk /tmp/openpilot/apk
COPY ./cereal /tmp/openpilot/cereal
COPY ./common /tmp/openpilot/common
COPY ./external /tmp/openpilot/external
COPY ./laika /tmp/openpilot/laika
COPY ./models /tmp/openpilot/models
COPY ./opendbc /tmp/openpilot/opendbc
COPY ./tools /tmp/openpilot/tools
COPY ./panda /tmp/openpilot/panda
COPY ./phonelibs /tmp/openpilot/phonelibs
COPY ./pyextra /tmp/openpilot/pyextra
COPY ./release /tmp/openpilot/release
COPY ./selfdrive /tmp/openpilot/selfdrive
COPY ./xx/__init__.py /tmp/openpilot/xx/__init__.py
COPY ./xx/chffr /tmp/openpilot/xx/chffr
COPY ./xx/pipeline /tmp/openpilot/xx/pipeline
COPY ./xx/uncommon /tmp/openpilot/xx/uncommon
COPY ./xx/tools/__init__.py /tmp/openpilot/xx/tools/__init__.py
COPY ./xx/tools/rldriving /tmp/openpilot/xx/tools/rldriving
COPY ./xx/models /tmp/openpilot/xx/models/
COPY flake8_openpilot.sh /tmp/openpilot/flake8_openpilot.sh
COPY pylint_openpilot.sh /tmp/openpilot/pylint_openpilot.sh
COPY .pylintrc /tmp/openpilot/.pylintrc
COPY SConstruct /tmp/openpilot/SConstruct
# Azure keys
ENV EXTERNAL 1
ENV CI 1
ENV AZUTIL_KEYS /tmp/openpilot/selfdrive/test/commadataci.json
RUN cd /tmp/openpilot && scons -c && scons -j$(nproc)