Skip to content

Commit

Permalink
Merge pull request #27 from groundlight/csi2-support
Browse files Browse the repository at this point in the history
Add support for Raspberry Pi CSI2 cameras
  • Loading branch information
f-wright authored Jul 25, 2024
2 parents 9a309aa + 5ddf3ba commit 6f9459a
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 6f9459a

Please sign in to comment.