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.

97 lines
2.1 KiB

5 years ago
#!/bin/bash -e
5 years ago
# NOTE: ubuntu_setup.sh doesn't run! only for reading now
5 years ago
sudo apt-get update && sudo apt-get install -y \
autoconf \
build-essential \
bzip2 \
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 \
libzmq5-dev \
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
python-dev \
python-pip \
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
echo "source $HOME/openpilot/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 3.7.3 globally (you should move to python3 anyway)
pyenv install -s 3.7.3
5 years ago
pyenv global 3.7.3
pyenv rehash
# **** in python env ****
5 years ago
# install pipenv
pip install pipenv==2018.11.26
# pipenv setup (in openpilot dir)
5 years ago
pipenv install --system --deploy
5 years ago
# to make tools work
pip install -r tools/requirements.txt
5 years ago
# to make modeld work on PC with nvidia GPU
pip install tensorflow-gpu==2.0
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