nopenpilot/Dockerfile.dev_ci

100 lines
2.7 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 \
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 --dev
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 ./xx/tools/mlmonitoring /tmp/openpilot/xx/tools/mlmonitoring
COPY ./xx/tools/reporter /tmp/openpilot/xx/tools/reporter
COPY flake8_openpilot.sh /tmp/openpilot/flake8_openpilot.sh
COPY pylint_openpilot.sh /tmp/openpilot/pylint_openpilot.sh
COPY .pylintrc /tmp/openpilot/.pylintrc
# Azure keys
ENV EXTERNAL 1
ENV CI 1
ENV AZUTIL_KEYS /tmp/openpilot/selfdrive/test/commadataci.json