diff --git a/README.md b/README.md index 35d7cd5..729cf18 100644 --- a/README.md +++ b/README.md @@ -105,8 +105,8 @@ paka cluster down -f cluster.yaml ## Dependencies - docker daemon and CLI -- credentials for the AWS cloud +- AWS CLI ```bash -# Ensure your AWS credentials are correctly configured. Execute the command below and verify that the keys `aws_access_key_id` and `aws_secret_access_key` are present. -cat ~/.aws/credentials +# Ensure your AWS credentials are correctly configured. +aws configure ``` diff --git a/examples/invoice_extraction/README.md b/examples/invoice_extraction/README.md index 711e4fb..10ea140 100644 --- a/examples/invoice_extraction/README.md +++ b/examples/invoice_extraction/README.md @@ -6,52 +6,52 @@ This code provides an example of how to build a RESTful API that converts an inv Follow the steps below to run the example: 1. **Install the necessary dependencies:** - ```bash - pip install paka +```bash +pip install paka - cat ~/.aws/credentials - # Make sure you have the following keys aws_access_key_id and aws_secret_access_key - ``` +# Install AWS CLI and ensure your AWS credentials are correctly configured. +aws configure +``` 2. **Ensure the Docker daemon is running:** - ```bash - docker info - ``` +```bash +docker info +``` 3. **Provision the cluster:** - ```bash - cd examples/invoice_extraction +```bash +cd examples/invoice_extraction - # Provision the cluster and update ~/.kube/config - paka cluster up -f cluster.yaml -u +# Provision the cluster and update ~/.kube/config +paka cluster up -f cluster.yaml -u - # Provision a cluster with Nvidia GPUs - paka cluster up -f gpu_cluster.yaml -u - ``` +# Provision a cluster with Nvidia GPUs +paka cluster up -f gpu_cluster.yaml -u +``` 4. **Deploy the App:** - ```bash - # The command below will build the source and deploy it as a serverless function. - paka function deploy --name invoice-extraction --source . --entrypoint serve - ``` +```bash +# The command below will build the source and deploy it as a serverless function. +paka function deploy --name invoice-extraction --source . --entrypoint serve +``` 5. **Check the status of the functions:** - ```bash - paka function list - ``` +```bash +paka function list +``` - If everything is successful, you should see the function in the list with a status of "READY". By default, the function is exposed through a publicly accessible REST API endpoint. +If everything is successful, you should see the function in the list with a status of "READY". By default, the function is exposed through a publicly accessible REST API endpoint. 6. **Test the App:** - Submit the PDF invoices by hitting the `/extract_invoice` endpoint of the deployed function. +Submit the PDF invoices by hitting the `/extract_invoice` endpoint of the deployed function. - ```bash - curl -X POST -H "Content-Type: multipart/form-data" -F "file=@/path/to/invoices/invoice-2024-02-29.pdf" http://invoice-extraction.default.xxxx.sslip.io/extract_invoice - ``` +```bash +curl -X POST -H "Content-Type: multipart/form-data" -F "file=@/path/to/invoices/invoice-2024-02-29.pdf" http://invoice-extraction.default.xxxx.sslip.io/extract_invoice +``` - If the invoice extraction is successful, you should see the structured data in the response, e.g. +If the invoice extraction is successful, you should see the structured data in the response, e.g. - ```json - {"number":"#25927345","date":"2024-01-31T05:07:53","company":"Akamai Technologies, Inc.","company_address":"249 Arch St. Philadelphia, PA 19106 USA","tax_id":"United States EIN: 04-3432319","customer":"John Doe","customer_address":"1 Hacker Way Menlo Park, CA 94025","amount":"$5.00"} - ``` +```json +{"number":"#25927345","date":"2024-01-31T05:07:53","company":"Akamai Technologies, Inc.","company_address":"249 Arch St. Philadelphia, PA 19106 USA","tax_id":"United States EIN: 04-3432319","customer":"John Doe","customer_address":"1 Hacker Way Menlo Park, CA 94025","amount":"$5.00"} +``` diff --git a/examples/website_rag/README.md b/examples/website_rag/README.md index dd1f15b..9ae8fbe 100644 --- a/examples/website_rag/README.md +++ b/examples/website_rag/README.md @@ -9,8 +9,8 @@ To run the example, first install the necessary dependencies: ```bash pip install paka -# Ensure your AWS credentials are correctly configured. Execute the command below and verify that the keys `aws_access_key_id` and `aws_secret_access_key` are present. -cat ~/.aws/credentials +# Install AWS CLI and ensure your AWS credentials are correctly configured. +aws configure ``` ### Make sure docker daemon is running