Skip to content

Installation Options

db39 edited this page Oct 7, 2022 · 35 revisions

Simple installation

For a simple installation/upgrade of TinyPilot, see the instructions in the main README.

Advanced installation

To choose configuration options for the install, specify them in the /home/tinypilot/settings.yml file. These settings would persist on every update too.

Possible variables are available in:

Example: custom resolution and release version

Here's an example that installs TinyPilot with a desired capture resolution of 1280x720 and chooses the 1.0.2 version of TinyPilot.

  1. Add the installation options to your TinyPilot settings.yml file:
TINYPILOT_SETTINGS="/home/tinypilot/settings.yml" && \
  sudo useradd --create-home --system --user-group tinypilot && \
  echo 'ustreamer_resolution: "1280x720"' | sudo tee -a "${TINYPILOT_SETTINGS}" && \
  echo 'tinypilot_repo_branch: "1.0.2"' | sudo tee -a "${TINYPILOT_SETTINGS}" && \
  sudo chown tinypilot:tinypilot "${TINYPILOT_SETTINGS}"
  1. Run the get-tinypilot.sh script:
curl \
  --silent \
  --show-error \
  https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/get-tinypilot.sh | \
    bash - && \
  sudo reboot

Example: TC358743 HDMI to CSI capture chip

If you're using a Toshiba TC358743-based HDMI capture chip, the following installation options optimize performance with that chip:

  1. Add the installation options to your TinyPilot settings.yml file:
TINYPILOT_SETTINGS="/home/tinypilot/settings.yml" && \
if [[ -f "${TINYPILOT_SETTINGS}" ]]; then
  sudo sed --in-place \
    --expression "/ustreamer_capture_device/d" \
    --expression "/ustreamer_encoder/d" \
    --expression "/ustreamer_format/d" \
    --expression "/ustreamer_resolution/d" ${TINYPILOT_SETTINGS} && \
    echo 'ustreamer_capture_device: tc358743' | sudo tee -a "${TINYPILOT_SETTINGS}"
else 
  sudo useradd --create-home --system --user-group tinypilot && \
    echo 'ustreamer_capture_device: tc358743' | sudo tee -a "${TINYPILOT_SETTINGS}" && \
    sudo chown tinypilot:tinypilot "${TINYPILOT_SETTINGS}"
fi
  1. Run the get-tinypilot.sh script:
curl \
  --silent \
  --show-error \
  https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/get-tinypilot.sh | \
    bash - && \
  sudo reboot

Developer installation

If you're interested in contributing to TinyPilot, see the CONTRIBUTING file for instructions on setting up your development environment.

Use proxy

This procedures shows how to install TinyPilot using proxy.

  1. get get-tinypilot.sh script.
sudo su
export http_proxy=http://<proxy server address>:<proxy port>/
# if you use proxy which requires login:
# export http_proxy=http://<user id>:<password>@<proxy server address>:<proxy port>/
export https_proxy=${http_proxy}
git config --global http.proxy ${http_proxy}
git config --global https.proxy ${https_proxy}
git config --global http.sslVerify false
wget --no-check-certificate https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/get-tinypilot.sh
  1. Edit get-tinypilot.sh and save as get-tinypilot-proxied.sh
sed -e 's/sudo apt-get/sudo -E apt-get/' get-tinypilot.sh > get-tinypilot-proxied.sh
sed -i -e 's/pip install/pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install/' get-tinypilot-proxied.sh
sed -i -e "s/ansible-galaxy install/ansible-galaxy install --ignore-cert/" get-tinypilot-proxied.sh
  1. Add the installation options to your TinyPilot settings.yml file:
TINYPILOT_SETTINGS="/home/tinypilot/settings.yml" && \
  sudo useradd --create-home --system --user-group tinypilot && \
  echo 'tinypilot_pip_args: "--trusted-host pypi.org --trusted-host files.pythonhosted.org"' | sudo tee -a "${TINYPILOT_SETTINGS}" && \
  sudo chown tinypilot:tinypilot "${TINYPILOT_SETTINGS}"
  1. Run get-tinypilot-proxied.sh
get-tinypilot-proxied.sh && reboot