Merged in feature/poetry (pull request #238)

Draft: Adding Poetry

* addpoetry

* pipes

* mypy

* streamlit

* searchforchange


Approved-by: Alex Galarce
This commit is contained in:
Michael McGuinness
2024-10-15 16:20:27 +00:00
parent 168d197349
commit 815fa7f0bc
127 changed files with 23586 additions and 1043 deletions
+9 -8
View File
@@ -1,8 +1,7 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.12
# options: 3.12, 3.9, 3.8
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION} AS build
# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1
@@ -11,15 +10,17 @@ ENV PYTHONDONTWRITEBYTECODE=1
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1
RUN --mount=type=cache,target=/root/.cache/pip \
python -m pip install poetry
WORKDIR /app
# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.cache/pip to speed up subsequent builds.
# Leverage a bind mount to requirements.txt to avoid having to copy them into
# into this layer.
COPY pyproject.toml .
COPY poetry.lock .
COPY README.md .
RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=requirements.txt,target=requirements.txt \
python -m pip install -r requirements.txt
poetry install --no-dev --compile
COPY . ${LAMBDA_TASK_ROOT}