openpilot/tools/ubuntu_setup.sh

104 lines
2.4 KiB
Bash
Raw Permalink Normal View History

2020-02-28 20:26:15 -07:00
#!/bin/bash -e
2020-02-28 21:18:02 -07:00
2021-04-03 14:42:05 -06:00
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
2020-02-28 20:26:15 -07:00
autoconf \
build-essential \
bzip2 \
capnproto \
2020-11-21 16:10:00 -07:00
cppcheck \
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 \
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 \
qml-module-qtquick2 \
qt5-default \
qtmultimedia5-dev \
qtwebengine5-dev \
qtlocation5-dev \
qtpositioning5-dev \
libqt5sql5-sqlite \
libqt5svg5-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 \
libqt5x11extras5-dev \
libreadline-dev
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
2021-03-09 14:38:22 -07:00
# install python
PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
2021-03-09 14:38:22 -07:00
pyenv install -s 3.8.5
pyenv global 3.8.5
2020-02-28 20:26:15 -07:00
pyenv rehash
eval "$(pyenv init -)"
2020-02-28 20:26:15 -07:00
2020-02-29 15:50:40 -07:00
# **** in python env ****
2020-11-19 15:54:26 -07:00
pip install --upgrade pip==20.2.4
2020-09-15 19:25:16 -06:00
pip install pipenv==2020.8.13
2020-06-05 15:03:24 -06:00
pipenv install --dev --system --deploy
echo
echo "---- FINISH OPENPILOT SETUP ----"
echo "Configure your active shell env by running:"
echo "source ~/.bashrc"