openpilot/tools/ubuntu_setup.sh

98 lines
2.2 KiB
Bash
Raw Normal View History

2020-02-28 20:26:15 -07:00
#!/bin/bash -e
2020-02-28 21:18:02 -07:00
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>
2020-09-10 04:14:49 -06:00
2020-02-28 20:26:15 -07:00
sudo apt-get update && sudo apt-get install -y \
autoconf \
build-essential \
bzip2 \
capnproto \
libcapnp-dev \
2020-02-28 20:26:15 -07:00
clang \
cmake \
curl \
ffmpeg \
git \
libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev \
2020-02-28 20:26:15 -07:00
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 \
2020-02-28 20:58:05 -07:00
libpng16-16 \
2020-02-28 20:26:15 -07:00
libssl-dev \
2020-02-28 20:44:59 -07:00
libstdc++-arm-none-eabi-newlib \
2020-02-28 20:26:15 -07:00
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 \
2020-02-28 20:26:15 -07:00
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
python-dev \
2020-10-29 17:51:09 -06:00
python3-pip \
qt5-default \
qtmultimedia5-dev \
2020-02-28 20:26:15 -07:00
screen \
sudo \
vim \
2020-02-29 15:50:40 -07:00
wget \
gcc-arm-none-eabi
2020-02-28 20:26:15 -07:00
2020-02-29 15:50:40 -07:00
# 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
2020-02-29 02:42:38 -07:00
# install pyenv
2020-02-29 15:50:40 -07:00
if ! command -v "pyenv" > /dev/null 2>&1; then
2020-02-29 02:42:38 -07:00
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
2020-02-29 02:42:38 -07:00
source ~/.bashrc
echo "added openpilot_env to bashrc"
fi
2020-02-29 15:50:40 -07:00
# 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 3.8.2 globally (you should move to python3 anyway)
pyenv install -s 3.8.2
pyenv global 3.8.2
2020-02-28 20:26:15 -07:00
pyenv rehash
2020-02-29 15:50:40 -07:00
# **** in python env ****
2020-02-28 20:26:15 -07:00
# install pipenv
2020-09-15 19:25:16 -06:00
pip install pipenv==2020.8.13
2020-02-28 20:26:15 -07:00
2020-02-29 02:42:38 -07:00
# pipenv setup (in openpilot dir)
2020-06-05 15:03:24 -06:00
pipenv install --dev --system --deploy
2020-02-28 21:18:02 -07:00
2020-02-28 21:22:47 -07:00
# for loggerd to work on ubuntu
# TODO: PC should log somewhere else
2020-02-29 02:42:38 -07:00
#sudo mkdir -p /data/media/0/realdata
#sudo chown $USER /data/media/0/realdata