openpilot/tools/ubuntu_setup.sh

94 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
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 \
libczmq-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 \
2020-02-28 20:26:15 -07:00
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
python-dev \
python-pip \
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
echo "source $HOME/openpilot/tools/openpilot_env.sh" >> ~/.bashrc
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
pip install pipenv==2018.11.26
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