Skip to content

Instantly share code, notes, and snippets.

custom:
pythonRequirements:
dockerizePip: non-linux
zip: true
slim: true
@jdunwoody
jdunwoody / include excludes in serverless.yml
Created April 3, 2019 06:41
include excludes in serverless.yml
package:
include:
- handler.py
- data/model.h5
- lib/**
exclude:
- ./**
@jdunwoody
jdunwoody / lib directory serverless.yml
Created April 3, 2019 06:22
Lib directory of serverless config
service: myService
package:
include:
...
- lib/**
functions:
prediction:
handler: handler.endpoint
@jdunwoody
jdunwoody / handler.py
Last active April 3, 2019 04:30
handler.py
# No imports before this unzip!
try:
import unzip_requirements
except ImportError:
pass
from keras.models import load_model
import pandas as pd
def endpoint(event: dict, context):
@jdunwoody
jdunwoody / requirements.txt
Created April 3, 2019 03:03
requirements.txt
tensorflow==1.13.0rc2
numpy==1.15.4
pandas==0.23.4
Keras==2.2.4
service: myService
provider:
name: aws
runtime: python3.6
region: ap-southeast-2
memorySize: 1536
timeout: 30
package:
@jdunwoody
jdunwoody / TensorFlow lambda serverless.yml
Last active April 3, 2019 02:55
Servlerless configuration for TensorFlow Lambda
service: myService
provider:
name: aws
runtime: python2.7
functions:
hello:
handler: handler.hello
@jdunwoody
jdunwoody / gist:5043906
Created February 27, 2013 00:55
gitconfig
[user]
name = James Dunwoody
email = [email protected]
[push]
default = tracking
[core]
editor = mvim
excludesfile = /Users/james/.gitignore_global
[color]
ui = true