Skip to content

Commit

Permalink
Test and works
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitri committed Apr 26, 2018
1 parent 3861b31 commit 4611fd4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
17 changes: 13 additions & 4 deletions greengo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ Lambdas:
Pinned: True # Set True for long-lived functions
Environment:
AccessSysfs: False
# TODO: add access to local file system for input
# ResourceAccessPolicies:
# - ResourceId: /vagrant/input
# Permission: 'rw'
ResourceAccessPolicies:
- ResourceId: resource_1_path_to_input
Permission: 'rw'
Variables:
WATCH_PATTERN: /input/*.jpeg

Expand All @@ -37,6 +36,16 @@ Lambdas:
Variables:
INTERVAL: '5'

Resources:
# Resource as defined at http://boto3.readthedocs.io/en/latest/reference/services/greengrass.html#Greengrass.Client.create_resource_definition_version
- Name: path_to_input
Id: resource_1_path_to_input
LocalVolumeResourceData:
SourcePath: /images
DestinationPath: /input
GroupOwnerSetting:
AutoAddGroupOwner: True

# Subscriptions: # not implemented
# - Source: Lambda::GreengrassImageClassification
# Subject: hello/world
Expand Down
9 changes: 9 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ wget -O /vagrant/downloads/root.ca.pem http://www.symantec.com/content/en/us/ent
# Copy greengrass binaries
sudo tar -xzf /vagrant/downloads/greengrass-ubuntu-x86-64-1.5.0.tar.gz -C /

# Install ML inference dependencies (MXNet)
sudo apt-get install -y python-pip python-dev gcc
sudo pip install mxnet
sudo apt-get install -y python-opencv

# Copy certificates and configurations
sudo cp /vagrant/certs/* /greengrass/certs
sudo cp /vagrant/config/* /greengrass/config
sudo cp /vagrant/downloads/root.ca.pem /greengrass/certs

# Create a source for images to map into the Lambda space later
sudo mkdir /images
sudo chown ggc_user:ggc_group /images

# Back up group.json - you'll thank me later
sudo cp /greengrass/ggc/deployment/group/group.json /greengrass/ggc/deployment/group/group.json.orig

Expand Down

0 comments on commit 4611fd4

Please sign in to comment.