Skip to content

Commit

Permalink
add CSI2 camera support
Browse files Browse the repository at this point in the history
  • Loading branch information
f-wright authored and robotrapta committed Jul 25, 2024
1 parent 9a309aa commit 5ddf3ba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions stage-gl1/01-install-python-libraries/00-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!/bin/bash -e

# set up a groundlight virtual environment for python
python3 -m venv /opt/groundlight/gl-py
# Set up a groundlight virtual environment for python. --system-site-packages is
# required for picamera2.
python3 -m venv /opt/groundlight/gl-py --system-site-packages
source /opt/groundlight/gl-py/bin/activate

# Now install the groundlight python libraries
pip install groundlight
# framegrab will install opencv-python, numpy, and pillow
pip install framegrab

# Install picamera2, required for use of Raspberry Pi CSI2 cameras. Note that there is
# an option to install through pip, but that is not the reccommended installation
# method. --no-install-recommends prevents installation of GUI dependencies.
sudo apt install -y python3-picamera2 --no-install-recommends

# add a .bashrc entry to activate the groundlight virtual environment
echo "source /opt/groundlight/gl-py/bin/activate" >> /home/${FIRST_USER_NAME}/.bashrc

Expand Down

0 comments on commit 5ddf3ba

Please sign in to comment.