Skip to content

Commit

Permalink
adds docs on how to build the image and fixes tests (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Esser50K authored Aug 1, 2021
1 parent 7a38e98 commit e5941e5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ Some modes (such as the [motion_detection](picameleon/modes/motion_detection.py)

Example configurations can be found in the [configs](picameleon/configs) folder.

## Build

Build the container locally (takes a while but should be accelerated through piwheels):

```
docker built -t picameleon:latest .
```

in case you are building it for the raspberrypi zero you need to specify the correct Dockerfile:

```
docker built -t picameleon:latest -f Dockerfile.zero .
```


## Deployment

Launching the daemon in a Docker container is supported and also recommended. There are two Dockerfiles which only differ in their base image to support the RaspberryPi Zero and all the other versions of the Pi.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_network_serving_mode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
sys.path.append("/picameleon")
from .mocks.mock_socket import MockSocket
from mocks.mock_socket import MockSocket
from modes.network_serving import NetworkServingMode
import json
import unittest
Expand Down Expand Up @@ -46,7 +46,7 @@ def test_routine(self, mocked_redis, mocked_socket):
self.assertTrue(client_address in mode.socket_map.keys())
self.assertTrue(client_address in mode.socket_to_stream.keys())
self.assertTrue(
mode.streamer_map["h264_1000000"].output.has_output(client_address))
mode.streamer_map["bitrate_1000000format_h264"].output.has_output(client_address))
mode.socket_map[client_address].close()
self.assertEqual(len(mode.socket_map), 0)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_network_trigger_mode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
sys.path.append("/picameleon")
from .mocks.mock_socket import MockSocket
from mocks.mock_socket import MockSocket
from modes.network_trigger import NetowrkTriggerMode
import json
import unittest
Expand Down

0 comments on commit e5941e5

Please sign in to comment.