mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge branch 'main' of github.com:Hestia-Homes/Model into mlmodel
This commit is contained in:
commit
eeff2817e2
3 changed files with 15 additions and 11 deletions
|
|
@ -1,17 +1,20 @@
|
||||||
FROM public.ecr.aws/lambda/python:3.10
|
FROM public.ecr.aws/lambda/python:3.10
|
||||||
|
|
||||||
# Set the working directory
|
# Set the working directory
|
||||||
WORKDIR ${LAMBDA_TASK_ROOT}/simulation_system
|
WORKDIR ${LAMBDA_TASK_ROOT}
|
||||||
|
|
||||||
|
# Install necessary build tools - required to test locally
|
||||||
|
# RUN yum install -y gcc python3-devel
|
||||||
|
|
||||||
# Install python packages
|
# Install python packages
|
||||||
COPY ../requirements/predictions/predictions.txt ./requirements.txt
|
COPY requirements/predictions/predictions.txt ./simulation_system/requirements.txt
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r ./simulation_system/requirements.txt
|
||||||
|
|
||||||
# Copy the project code to the working directory
|
# Copy the project code to the working directory
|
||||||
COPY ./core ./core
|
COPY ./core ./simulation_system/core
|
||||||
COPY ./MLModel ./MLModel
|
COPY ./MLModel ./simulation_system/MLModel
|
||||||
COPY ./predictions.py ./predictions.py
|
COPY ./predictions.py ./simulation_system/predictions.py
|
||||||
COPY ./handlers/predictions_app.py ./predictions_app.py
|
COPY ./handlers/predictions_app.py ./simulation_system/predictions_app.py
|
||||||
|
|
||||||
# Run off a lambda trigger
|
# Run off a lambda trigger
|
||||||
CMD [ "predictions_app.handler" ]
|
CMD [ "simulation_system.predictions_app.handler" ]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
from predictions import prediction
|
from ..predictions import prediction
|
||||||
|
|
||||||
RUNTIME_ENVIRONMENT = os.environ.get("RUNTIME_ENVIRONMENT", "dev")
|
RUNTIME_ENVIRONMENT = os.environ.get("RUNTIME_ENVIRONMENT", "dev")
|
||||||
|
|
||||||
|
|
@ -30,7 +30,8 @@ def handler(event, context):
|
||||||
# model_path = os.environ.get("MODEL_PATH", "http://minio:9000/data/model_directory/")
|
# model_path = os.environ.get("MODEL_PATH", "http://minio:9000/data/model_directory/")
|
||||||
model_path = os.environ.get(
|
model_path = os.environ.get(
|
||||||
"MODEL_PATH",
|
"MODEL_PATH",
|
||||||
"s3://retrofit-model-directory-{RUNTIME_ENVIRONMENT}/RDSAP_CHANGE/autogluon/rdsap_change-medium_quality-30-2023-08-30_11-43-41/deployment/",
|
"s3://retrofit-model-directory-{RUNTIME_ENVIRONMENT}/RDSAP_CHANGE/autogluon/rdsap_change-medium_quality-30"
|
||||||
|
"-2023-08-30_11-43-41/deployment/",
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ plugins:
|
||||||
custom:
|
custom:
|
||||||
customDomain:
|
customDomain:
|
||||||
domainName: api.${self:provider.environment.DOMAIN_NAME}
|
domainName: api.${self:provider.environment.DOMAIN_NAME}
|
||||||
basePath: 'v1/sapmodel'
|
basePath: 'sapmodel'
|
||||||
createRoute53Record: true
|
createRoute53Record: true
|
||||||
certificateArn: ${ssm:/ssl_certificate_arn}
|
certificateArn: ${ssm:/ssl_certificate_arn}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue