Skip to content

Instantly share code, notes, and snippets.

@Hironsan
Created June 29, 2020 02:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hironsan/c2c305999a6a13a69a35540ef8654571 to your computer and use it in GitHub Desktop.
Save Hironsan/c2c305999a6a13a69a35540ef8654571 to your computer and use it in GitHub Desktop.
REGION=us-west-1
RUNTIME=python3.7
docker run \
-v $(pwd):/opt \
-it lambci/lambda:build-$RUNTIME \
pip install spacy -t /opt/python
zip -r spacy.zip python/
aws lambda publish-layer-version \
--layer-name spaCy \
--region $REGION \
--description "spaCy for Lambda Layers" \
--zip-file fileb://spacy.zip \
--compatible-runtimes $RUNTIME
rm -rf python *.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment