mirror of
https://github.com/Hestia-Homes/ML.git
synced 2026-06-08 11:17:25 +00:00
25 lines
759 B
Text
25 lines
759 B
Text
FROM public.ecr.aws/lambda/python:3.10
|
|
|
|
# Set the working directory
|
|
WORKDIR ${LAMBDA_TASK_ROOT}
|
|
ENV PYTHONPATH "${PYTHONPATH}:${LAMBDA_TASK_ROOT}"
|
|
|
|
# Environment variables
|
|
ARG RUNTIME_ENVIRONMENT
|
|
ENV RUNTIME_ENVIRONMENT=${RUNTIME_ENVIRONMENT}
|
|
|
|
# Install necessary build tools - required to test locally
|
|
RUN yum install -y gcc python3-devel
|
|
|
|
# Install python packages
|
|
COPY modules/ml-pipeline/src/requirements/predictions/requirements.txt ./requirements.txt
|
|
RUN pip install --no-cache-dir -r ./requirements.txt
|
|
|
|
# Copy the project code
|
|
COPY modules/ml-pipeline/src/pipeline ./pipeline
|
|
# Copy the handler
|
|
COPY deployment/handlers/prediction_app.py prediction_app.py
|
|
# Get the model
|
|
# RUN dvc pull -r ${RUNTIME_ENVIRONMENT}
|
|
|
|
CMD [ "prediction_handler.handler" ]
|