dragonpilot - 基於 openpilot 的開源駕駛輔助系統
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.3 KiB

5 years ago
#!/bin/bash -e
5 years ago
dockerize carla + openpilot (#2011) * dockerize carla + openpilot * separate dockerfile * bring back CI dockerfile * cleanup bridge * add op docker build and start script * build container in CI * fix camerad hack * remove most magic numbers from bridge.py * openpilot-sim docker build and run scripts * fix dmonitoring hacks * revert controlsd hacks * clean up build scripts * singular * fix path * fix image name * modify sim readme * sim readme and start script changes * dockerfile with working opengl * working opengl + passing panda build_st in docker * fix bug in sim docker file * bugfix sim docker file * bugfix all op-sim docker issues * modify readme + run script * IT DRIVES * clean this up * more cleanup * cleanup docker stuff * more cleanup * start with openpilot-base * install carla python package * Script is not in lib * chmod * everything should be running in docker now, the code may not be nice though * works locally... * rhdChecked is deprecated * Checkout using git lfs when building sim container * try to pass the tests * pull latest docker * gps should not throw an error on openpilot launch in bridge.py * fixed a coding style error * Only start ubloxd in car * fixed more style problems * revert typo * Use enviromental variable to prevent errors in a simulator * Remove unused import * Attempt to fix missing enviromental variable * fix typo * less work for users, auto tmux engagement * less work for users, auto tmux engagement * fix check for nvidia * clean up nvidia check * remove typo, shorted dockerfile Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: Willem Melching <willem.melching@gmail.com> Co-authored-by: Bruce Wayne <batman@workstation-eu-gregor.eu.local> Co-authored-by: Gregor Kikelj <gregor1234567890@gmail.com>
5 years ago
5 years ago
sudo apt-get update && sudo apt-get install -y \
autoconf \
build-essential \
bzip2 \
capnproto \
cppcheck \
libcapnp-dev \
5 years ago
clang \
cmake \
curl \
ffmpeg \
git \
libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev \
5 years ago
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 \
5 years ago
libpng16-16 \
5 years ago
libssl-dev \
libstdc++-arm-none-eabi-newlib \
5 years ago
libsqlite3-dev \
libtool \
libusb-1.0-0-dev \
libzmq3-dev \
libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev \
libsystemd-dev \
5 years ago
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
python-dev \
python3-pip \
qml-module-qtquick2 \
qt5-default \
qtmultimedia5-dev \
qtwebengine5-dev \
5 years ago
screen \
sudo \
vim \
wget \
gcc-arm-none-eabi
5 years ago
# install git lfs
if ! command -v "git-lfs" > /dev/null 2>&1; then
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
fi
# install pyenv
if ! command -v "pyenv" > /dev/null 2>&1; then
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
fi
# install bashrc
source ~/.bashrc
if [ -z "$OPENPILOT_ENV" ]; then
OP_DIR=$(git rev-parse --show-toplevel)
echo "source $OP_DIR/tools/openpilot_env.sh" >> ~/.bashrc
source ~/.bashrc
echo "added openpilot_env to bashrc"
fi
# in the openpilot repo
cd $HOME/openpilot
# do the rest of the git checkout
git lfs pull
git submodule init
git submodule update
# install python
pyenv install -s 3.8.5
pyenv global 3.8.5
5 years ago
pyenv rehash
eval "$(pyenv init -)"
5 years ago
# **** in python env ****
# upgrade pip
pip install --upgrade pip==20.2.4
5 years ago
# install pipenv
pip install pipenv==2020.8.13
5 years ago
# pipenv setup (in openpilot dir)
pipenv install --dev --system --deploy
5 years ago
5 years ago
# for loggerd to work on ubuntu
# TODO: PC should log somewhere else
#sudo mkdir -p /data/media/0/realdata
#sudo chown $USER /data/media/0/realdata