Spaces:
Sleeping
Sleeping
Clement Vachet
commited on
Commit
·
b645f1c
1
Parent(s):
c072afc
Add README file
Browse files
README.md
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# IRIS classification task with AWS Lambda
|
2 |
+
|
3 |
+
## Workflow: use of AWS lambda function for deployment
|
4 |
+
Steps to Deploy
|
5 |
+
|
6 |
+
### Training the Model:
|
7 |
+
|
8 |
+
bash
|
9 |
+
> python train.py
|
10 |
+
|
11 |
+
### Building the docker image:
|
12 |
+
|
13 |
+
bash
|
14 |
+
> docker build -t iris-lambda .
|
15 |
+
|
16 |
+
### Running the docker container locally:
|
17 |
+
|
18 |
+
bash
|
19 |
+
|
20 |
+
> docker run --name iris-lambda-cont -p 8080:8080 iris-lambda
|
21 |
+
|
22 |
+
|
23 |
+
### Testing locally:
|
24 |
+
|
25 |
+
Use a tool like curl to send a test request:
|
26 |
+
|
27 |
+
bash
|
28 |
+
> curl -XPOST "http://localhost:8080/2015-03-31/functions/function/invocations" -d '{"body": "{\"features\": [[6.5, 3.0, 5.8, 2.2], [6.1, 2.8, 4.7, 1.2]]}"}'
|
29 |
+
|
30 |
+
Deploy to AWS Lambda: Package the code and dependencies, then upload to AWS Lambda via the AWS Management Console or AWS CLI.
|
31 |
+
|
32 |
+
This setup provides a complete pipeline from training the model to deploying it on AWS Lambda.
|