Skip to content

Commit

Permalink
Rework dependency management of thumbail lambda (#3291)
Browse files Browse the repository at this point in the history
  • Loading branch information
sir-sigurd authored Jan 26, 2023
1 parent 181402c commit d91e53b
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 14 deletions.
3 changes: 1 addition & 2 deletions lambdas/thumbnail/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ RUN apt-get update && \
python3-dev \
python3-pip

COPY shared/requirements.txt /requirements/shared.txt
COPY thumbnail/requirements.txt /requirements/thumbnail.txt
RUN pip install -U pip setuptools
RUN pip install --target /deps awslambdaric -r /requirements/shared.txt -r /requirements/thumbnail.txt
RUN pip install --target /deps -r /requirements/thumbnail.txt
RUN curl --output /deps/unoconv \
https://raw.githubusercontent.com/unoconv/unoconv/be5301a757552f4ecac5d73187ce4d8e18341306/unoconv

Expand Down
14 changes: 14 additions & 0 deletions lambdas/thumbnail/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "t4_lambda_thumbnail"
version = "0.0.1"
requires-python = ">=3.7"

dependencies = [
"aicsimageio==3.0.7",
"imageio==2.5.0",
"numpy==1.21.5",
"pdf2image==1.13.1",
"Pillow==9.0.1",
"python-pptx==0.6.21",
"requests==2.26.0",
]
58 changes: 54 additions & 4 deletions lambdas/thumbnail/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,68 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile --extra=lambda --output-file=requirements.txt ../shared/setup.py pyproject.toml
#
aicsimageio==3.0.7
# via t4-lambda-thumbnail (pyproject.toml)
attrs==19.1.0
# via jsonschema
awslambdaric==2.0.4
# via t4-lambda-shared (../shared/setup.py)
certifi==2022.12.7
chardet==3.0.4
# via requests
charset-normalizer==2.0.12
# via requests
idna==2.8
# via requests
imageio==2.5.0
# via
# aicsimageio
# t4-lambda-thumbnail (pyproject.toml)
importlib-metadata==2.1.3
# via awslambdaric
jsonschema==3.0.1
# via t4-lambda-shared (../shared/setup.py)
lxml==4.9.2
# via python-pptx
numpy==1.21.5
# via
# aicsimageio
# imageio
# scipy
# t4-lambda-thumbnail (pyproject.toml)
# tifffile
pdf2image==1.13.1
Pillow==9.0.1
psutil==5.7.0
# via t4-lambda-thumbnail (pyproject.toml)
pillow==9.0.1
# via
# imageio
# pdf2image
# python-pptx
# t4-lambda-thumbnail (pyproject.toml)
pyrsistent==0.14.11
# via jsonschema
python-pptx==0.6.21
# via t4-lambda-thumbnail (pyproject.toml)
requests==2.26.0
# via t4-lambda-thumbnail (pyproject.toml)
scipy==1.7.3
tifffile==0.15.1
# via aicsimageio
simplejson==3.17.2
# via awslambdaric
six==1.12.0
# via
# jsonschema
# pyrsistent
tifffile==0.15.1
# via aicsimageio
urllib3==1.26.5
# via requests
xlsxwriter==3.0.7
# via python-pptx
zipp==3.11.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
8 changes: 0 additions & 8 deletions lambdas/thumbnail/setup.py

This file was deleted.

0 comments on commit d91e53b

Please sign in to comment.