|
| 1 | +# Setup OCI Agent Development Kit (ADK) |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This lab will take you through the steps needed to install ADK using python installer .We recommend to use *OCI DATA Science* based notebook to run the operation as it comes with all the necessary software in place,however we have added an optional steps to follow local machine for ADK client setup. |
| 6 | + |
| 7 | +Estimated Time: 30 minutes |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +## Task 1: Setup OCI Data Science notebook for **ADK** usage. |
| 12 | + |
| 13 | +1. From OCI Console > *AI & Analytics* > *Data science* |
| 14 | + |
| 15 | +  |
| 16 | +1. Select *Create project*.Provide name and description. |
| 17 | + |
| 18 | +  |
| 19 | + |
| 20 | +1. With in the project,click *Create notebook session*. |
| 21 | + |
| 22 | +  |
| 23 | + |
| 24 | +1. Provide a name and retain all the other default settings and click *Create*. |
| 25 | + |
| 26 | +  |
| 27 | + |
| 28 | +1. Wait for the resource to become active. |
| 29 | + |
| 30 | +  |
| 31 | + |
| 32 | +1. Open the notebook detail page and click *Open*. |
| 33 | + |
| 34 | +  |
| 35 | + |
| 36 | +1. Provide credentials and multi factor auth when prompted.Wait for the notebook to be opened. |
| 37 | + |
| 38 | +  |
| 39 | + |
| 40 | +1. Click *extend* and extend the notebook timeout. |
| 41 | + |
| 42 | +**You can skip the next section and follow to Task 3** |
| 43 | + |
| 44 | + |
| 45 | +## Task 2: (Optional) Setup a local machine for **ADK** usage. |
| 46 | + |
| 47 | +1. Python ADK requires Python 3.10 or later. Ensure you have the correct version of Python installed in your environment. |
| 48 | +1. Follow below and installed *OCI* with *ADK* |
| 49 | + |
| 50 | + ``` |
| 51 | + <copy> |
| 52 | + # Create a project folder with name of your choice |
| 53 | + mkdir <your-project-name> |
| 54 | + cd <your-project-name> |
| 55 | + # Create and activate a virtual environment under `<myenv>` subfolder |
| 56 | + python -m venv <myenv> |
| 57 | + source <myenv>/bin/activate |
| 58 | + </copy> |
| 59 | + ``` |
| 60 | +1. After you create a project and a virtual environment, install the latest version of ADK: |
| 61 | + |
| 62 | + ``` |
| 63 | + <copy> |
| 64 | + pip install "oci[adk]" |
| 65 | + pip install oci-cli |
| 66 | + </copy> |
| 67 | + ``` |
| 68 | +1. Create an *API Signing Key* and store for further usage. Refer [here](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two) for detailed steps. |
| 69 | + |
| 70 | +## Task 3: Validate ADK installation using OCI Data science. |
| 71 | + |
| 72 | +1. Follow below steps if you are using a data science notebook.If not move to Task 4. |
| 73 | + |
| 74 | +* Click File > New >Notebook. |
| 75 | + |
| 76 | +  |
| 77 | + |
| 78 | +1. Right click on Untitled notebook and rename the same. |
| 79 | + |
| 80 | +  |
| 81 | + |
| 82 | +1. Run below and validate it returns the correct name reference. |
| 83 | + |
| 84 | + ``` |
| 85 | + <copy> |
| 86 | + from oci.addons import adk |
| 87 | + adk.__name__ |
| 88 | + </copy> |
| 89 | + ``` |
| 90 | +  |
| 91 | + |
| 92 | +## Task 3: Validate ADK installation for local setup. |
| 93 | + |
| 94 | +1. Follow below steps for local machine |
| 95 | + |
| 96 | + ``` |
| 97 | + <copy> |
| 98 | + from oci.addons import adk |
| 99 | + adk.__name__ |
| 100 | + </copy> |
| 101 | + ``` |
| 102 | +1. Validate the name reference. |
| 103 | + |
| 104 | +**Proceed to the next lab.** |
| 105 | + |
| 106 | +## Acknowledgements |
| 107 | + |
| 108 | +* **Author** |
| 109 | + * **Rahul MR**, Principal Solutions Architect - OCI |
| 110 | +* **Contributors** |
| 111 | + * **Sanjeeva Kalva**, Principal Data Scientist - OCI |
0 commit comments