Skip to content

Commit

Permalink
Fixes #16 - makes the .venv environment globally writable (#17)
Browse files Browse the repository at this point in the history
* Making the .venv environment globally writable after it's built.

* Fixing readme.

* Reverting some inadvertent deprovements to the readme
  • Loading branch information
robotrapta authored Feb 5, 2024
1 parent c439a2a commit e555804
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions GL-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ There are several different images available, depending on your needs, from smal

- **`sdk-only`** - A minimal image with just the Python SDK installed. This is the smallest image, and is suitable for running the SDK on a Raspberry Pi Zero W. It is also suitable for running the SDK on a Raspberry Pi 3 or 4, if you don't need the GUI.
- **`mns-headless`** - an image with the [Groundlight Monitoring Notification Server (MNS)](https://github.com/groundlight/monitoring-notification-server) installed for headless use. "Headless" means it runs the server, which serves HTML pages, but has no browser or GUI to use it from. You need to connect from another machine to use MNS. The MNS provides a simple way to configure cameras, Groundlight detectors, and send notifications conditions are met.
- **`full`** - an image with the Groundlight MNS installed, and a desktop GUI with a browser. This is appropriate for a Raspberry Pi which will have a screen attached to it.
- **`desktop`** - an image with the Groundlight MNS installed, and a desktop GUI with a browser. This is appropriate for a Raspberry Pi which will have a screen attached to it.
- **`edge`** - Not available yet. The Edge Endpoint server is still too resource hungry to run on a Raspberry Pi. Please [leave a comment](https://github.com/groundlight/groundlight-pi-gen/issues/5) if you'd like to use this.


Expand All @@ -17,6 +17,14 @@ This build system is based on [pi-gen](https://github.com/RPi-Distro/pi-gen). R

Note that we're tracking the `arm64` branch, not main. (If we build off the main branch, we hit [an issue with missing `arm/v8` docker images](https://github.com/groundlight/monitoring-notification-server/issues/39) and likely others, because we make these funky machines with a 64-bit kernel, but 32-bit applications.)

### Stages

- **`sdk-only`** - Saved after `stage-gl1`
- **`mns-headless`** - Saved after `stage-gl2`
- **`desktop`** - Saved after `stage4`

Refer to the [`gl-config`](./gl-config) and [`gl-config-release`](./gl-config-release) files for the how the stages are used.


## Building Images

Expand Down Expand Up @@ -62,7 +70,7 @@ touch stage-gl1/SKIP_IMAGES
To start over try

```
./dobuild.sh CLEAN=1
CLEAN=1 ./dobuild.sh
```

**Unmount errors** - try `sudo mv work deleteme-work`
Expand Down
4 changes: 3 additions & 1 deletion stage-gl1/01-install-python-libraries/00-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# set up a groundlight virtual environment for python
python3 -m venv /opt/groundlight/gl-py
chmod a+rw -R /opt/groundlight/gl-py
source /opt/groundlight/gl-py/bin/activate

# Now install the groundlight python libraries
Expand All @@ -12,3 +11,6 @@ pip install framegrab

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

# Make the .env dir globally writable AFTER everything's installed
chmod a+rw -R /opt/groundlight/gl-py

0 comments on commit e555804

Please sign in to comment.