diff --git a/assets/lambda/Dockerfile b/assets/lambda/Dockerfile index 13649b7..41b904c 100644 --- a/assets/lambda/Dockerfile +++ b/assets/lambda/Dockerfile @@ -1,17 +1,16 @@ FROM public.ecr.aws/lambda/python:3.11-x86_64 +COPY --from=ghcr.io/astral-sh/uv:0.5.1 /uv /uvx /bin/ + RUN yum update -y && yum install -y git libicu-devel gcc gcc-c++ # Copy requirements.txt COPY requirements.txt . # Install the specified packages -RUN pip install -r requirements.txt --only-binary :all: - -RUN pip install pyicu +RUN uv pip install --system -r requirements.txt -# Copy function code -COPY . . +RUN uv pip install --system pyicu COPY lambda-handlers.py . diff --git a/assets/lambda/requirements.txt b/assets/lambda/requirements.txt index 81006b6..059ec2c 100644 --- a/assets/lambda/requirements.txt +++ b/assets/lambda/requirements.txt @@ -1,27 +1,65 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate --no-emit-index-url -# -apig-wsgi==2.18.0 -blinker==1.8.2 -bootstrap-flask==2.4.0 +# This file was autogenerated by uv via the following command: +# uv pip compile requirements.in -o requirements.txt +apig-wsgi==2.19.0 + # via -r requirements.in +blinker==1.9.0 + # via flask +bootstrap-flask==2.4.1 + # via -r requirements.in chardet==5.2.0 + # via reportlab chitboxes==0.0.1 + # via -r requirements.in click==8.1.7 + # via flask configargparse==1.7 -domdiv==4.8.0 + # via domdiv +domdiv==4.9.0 + # via -r requirements.in flask==3.0.3 -flask-uploads @ git+http://github.com/maxcountryman/flask-uploads.git -flask-wtf==1.2.1 + # via + # bootstrap-flask + # flask-uploads + # flask-wtf +flask-uploads @ git+http://github.com/maxcountryman/flask-uploads.git@f66d7dc93e684fa0a3a4350a38e41ae00483a796#egg=Flask_Uploads + # via -r requirements.in +flask-wtf==1.2.2 + # via -r requirements.in itsdangerous==2.2.0 + # via + # flask + # flask-wtf jinja2==3.1.4 + # via flask loguru==0.7.2 -markupsafe==2.1.5 -numpy==2.1.1 -pillow==10.4.0 + # via + # -r requirements.in + # domdiv +markupsafe==3.0.2 + # via + # jinja2 + # werkzeug + # wtforms +numpy==2.1.3 + # via + # chitboxes + # tuckboxes +pillow==11.0.0 + # via + # chitboxes + # domdiv + # reportlab + # tuckboxes reportlab==4.2.5 + # via + # chitboxes + # domdiv + # tuckboxes tuckboxes==0.0.1 -werkzeug==3.0.4 -wtforms==3.1.2 + # via -r requirements.in +werkzeug==3.1.3 + # via flask +wtforms==3.2.1 + # via + # bootstrap-flask + # flask-wtf diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7122579 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.ruff.lint] +select = ["I"] diff --git a/requirements.txt b/requirements.txt index 3ede3c5..396ca79 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,48 +1,44 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-emit-index-url -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements.in -o requirements.txt attrs==24.2.0 # via # cattrs # jsii -aws-cdk-asset-awscli-v1==2.2.205 +aws-cdk-asset-awscli-v1==2.2.211 # via aws-cdk-lib -aws-cdk-asset-kubectl-v20==2.1.2 +aws-cdk-asset-kubectl-v20==2.1.3 # via aws-cdk-lib aws-cdk-asset-node-proxy-agent-v6==2.1.0 # via aws-cdk-lib -aws-cdk-aws-lambda-python-alpha==2.160.0a0 +aws-cdk-aws-lambda-python-alpha==2.166.0a0 # via -r requirements.in aws-cdk-cloud-assembly-schema==38.0.1 # via aws-cdk-lib -aws-cdk-lib==2.160.0 +aws-cdk-lib==2.166.0 # via # -r requirements.in # aws-cdk-aws-lambda-python-alpha # cdk-monitoring-constructs -cattrs==23.2.3 +cattrs==24.1.2 # via jsii -cdk-monitoring-constructs==8.3.1 +cdk-monitoring-constructs==8.4.0 # via -r requirements.in certifi==2024.8.30 # via requests cfgv==3.4.0 # via pre-commit -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via requests -constructs==10.3.0 +constructs==10.4.2 # via # aws-cdk-aws-lambda-python-alpha # aws-cdk-lib # cdk-monitoring-constructs -distlib==0.3.8 +distlib==0.3.9 # via virtualenv filelock==3.16.1 # via virtualenv -identify==2.6.1 +identify==2.6.2 # via pre-commit idna==3.10 # via requests @@ -50,7 +46,7 @@ importlib-resources==6.4.5 # via jsii jinja2==3.1.4 # via -r requirements.in -jsii==1.103.1 +jsii==1.104.0 # via # aws-cdk-asset-awscli-v1 # aws-cdk-asset-kubectl-v20 @@ -60,13 +56,13 @@ jsii==1.103.1 # aws-cdk-lib # cdk-monitoring-constructs # constructs -markupsafe==2.1.5 +markupsafe==3.0.2 # via jinja2 nodeenv==1.9.1 # via pre-commit platformdirs==4.3.6 # via virtualenv -pre-commit==3.8.0 +pre-commit==4.0.1 # via -r requirements.in publication==0.0.3 # via @@ -104,5 +100,5 @@ typing-extensions==4.12.2 # via jsii urllib3==2.2.3 # via requests -virtualenv==20.26.6 +virtualenv==20.27.1 # via pre-commit