-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile_Training_Testing
35 lines (23 loc) · 1.15 KB
/
Dockerfile_Training_Testing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM public.ecr.aws/lambda/python:3.10
# Copy requirements.txt
#COPY requirements.txt ${LAMBDA_TASK_ROOT}
# Copy function code
#COPY lambda_function.py ${LAMBDA_TASK_ROOT}
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install the specified packages
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Copy function code
#COPY lambda_function.py ${LAMBDA_TASK_ROOT}
# Copy artifacts from S3?
# This needs to be triggered at the time of training and testing only not for deploying to lambda
# this will be triggered when either the Dockerfile or requirements is changed or ..
# when the PR commit message includes the keyword "train Notebooks/training_example.ipynb"
# RUN pytest --nbval-lax credit_card_approval.ipynb --junitxml=report.xml
## something on the pipeline side to put the artifacts in S3 including the model file
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
# this is needed for lambda, we will probably override it all the time except for deploying to lambda
# CMD [ "lambda_function.handler" ]