FROM commaai/openpilot-base:latest
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN apt-get update && apt-get install -y \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    apt-utils \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    unzip \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    tar \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    curl \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    xz-utils \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    beignet-opencl-icd \
 
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    libglvnd-dev \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    alien \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    dbus \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    gcc-arm-none-eabi \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    tmux \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    vim \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  && rm -rf /var/lib/apt/lists/*
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Intel OpenCL driver
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ARG INTEL_DRIVER=opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25.tgz
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ARG INTEL_DRIVER_URL=http://registrationcenter-download.intel.com/akdlm/irc_nas/9019
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN mkdir -p /tmp/opencl-driver-intel
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								WORKDIR /tmp/opencl-driver-intel
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN echo INTEL_DRIVER is $INTEL_DRIVER; \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    curl -O $INTEL_DRIVER_URL/$INTEL_DRIVER; \
 
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    tar -xzf $INTEL_DRIVER; \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    for i in $(basename $INTEL_DRIVER .tgz)/rpm/*.rpm; do alien --to-deb $i; done; \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    dpkg -i *.deb; \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    rm -rf $INTEL_DRIVER $(basename $INTEL_DRIVER .tgz) *.deb; \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mkdir -p /etc/OpenCL/vendors; \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo /opt/intel/*/lib64/libintelocl.so > /etc/OpenCL/vendors/intel.icd; \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    rm -rf /tmp/opencl-driver-intel;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Open[GL,CL] for gpu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES},display
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN apt-get update && apt-get install -y --no-install-recommends \
 
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      mesa-utils \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ocl-icd-libopencl1 \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    && rm -rf /var/lib/apt/lists/*
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN mkdir -p /etc/OpenCL/vendors && \
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ENV NVIDIA_VISIBLE_DEVICES all
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,display
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN dbus-uuidgen > /etc/machine-id
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# CARLA python api
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./tools/sim/install_carla.sh /tmp
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN /tmp/install_carla.sh
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# 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
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								ENV PYTHONPATH $HOME/openpilot:${PYTHONPATH}
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN mkdir -p $HOME/openpilot
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY SConstruct $HOME/openpilot/
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./phonelibs $HOME/openpilot/phonelibs
 
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								COPY ./site_scons $HOME/openpilot/site_scons
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./rednose $HOME/openpilot/rednose
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./common $HOME/openpilot/common
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./models $HOME/openpilot/models
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./opendbc $HOME/openpilot/opendbc
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./cereal $HOME/openpilot/cereal
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./panda $HOME/openpilot/panda
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./selfdrive $HOME/openpilot/selfdrive
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY ./tools $HOME/openpilot/tools
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								WORKDIR $HOME/openpilot
 
							 
						 
					
						
							
								
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								RUN scons -j$(nproc)