You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/20-dev-env/1-dev-env-setup.mdx
+33-10Lines changed: 33 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ import Screenshot from "@site/src/components/Screenshot";
7
7
8
8
Navigate to [this](https://github.com/codespaces/new/mongodb-developer/genai-devday-notebooks?quickstart=1) link. Click the **Resume this codespace** button to resume the code space you created previously.
Give the codespace a few seconds to restart. When files appear under the Explorer, click the file named `ai-rag-lab.ipynb`. This is the Jupyter Notebook you will be using throughout this lab.
13
13
14
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/30-dev-env/1-dev-env-setup/3-nav-notebook.png"alt="Navigate to the notebook" />
14
+
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/1-dev-env-setup/2-nav-notebook.png"alt="Navigate to the notebook" />
15
15
</details>
16
16
17
17
:::tip
@@ -24,33 +24,56 @@ You will be working in a Jupyter Notebook in a GitHub Codespace throughout this
24
24
25
25
Navigate to [this](https://github.com/codespaces/new/mongodb-developer/genai-devday-notebooks?quickstart=1) link. You will be prompted to sign into GitHub if you haven't already. Once signed in, click the **Create new codespace** button to create a new codespace.
26
26
27
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/30-dev-env/1-dev-env-setup/2-create-codespace.png"alt="Start a codespace" />
27
+
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/1-dev-env-setup/3-create-codespace.png"alt="Start a codespace" />
28
28
29
-
Let it run for a few seconds as it prepares your environment. It will clone the repository, prepare the container, and run the installation scripts. Once the environment is built, you should see a list of files appear under the Explorer.
29
+
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
30
+
31
+
Once the environment is built, you should see a VS Code IDE with a list of files under the Explorer tab.
30
32
31
33
In the left navigation bar of the IDE, click on the file named `ai-rag-lab.ipynb` to open the Jupyter Notebook for this lab.
32
34
33
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/30-dev-env/1-dev-env-setup/3-nav-notebook.png"alt="Navigate to the notebook" />
35
+
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/1-dev-env-setup/2-nav-notebook.png"alt="Navigate to the notebook" />
34
36
35
37
Next, select the Python interpreter by clicking **Select Kernel** at the top right of the IDE.
If the connection was successful, you should see the cluster and its default databases under Connections. Any additional databases and collections created during the lab will appear here as well.
During the lab, we will use GitHub Codespaces. These instructions are here just in case you can't use Codespaces or if you really, really, really want a local installation.
51
74
:::
52
75
53
-
If you want to run the notebook locally, follow the steps below:
76
+
To run the lab locally, follow the steps below:
54
77
55
78
* Clone the [GitHub repo](https://github.com/mongodb-developer/genai-devday-notebooks.git) for this lab by executing the following command from the terminal:
56
79
@@ -86,4 +109,4 @@ jupyter notebook
86
109
87
110
* In the browser tab that pops up, open the file named `ai-rag-lab.ipynb`.
Replace any placeholders and run the cells under **Step 1: Setup prerequisites** section in the notebook.
4
+
5
+
:::info
6
+
7
+
Additional steps **if you are running the lab locally**:
8
+
9
+
* Spin up a MongoDB Atlas cluster and set the `MONGODB_URI` variable in this step to the connection string for your cluster as follows:
10
+
11
+
```python
12
+
MONGODB_URI="<your_connection_string>"
13
+
```
14
+
15
+
Follow these steps to get set up with a MongoDB Atlas cluster:
16
+
17
+
* Register for a [free MongoDB Atlas account](https://www.mongodb.com/cloud/atlas/register)
18
+
*[Create a new database cluster](https://www.mongodb.com/docs/guides/atlas/cluster/?utm_campaign=devrel&utm_source=third-party-content&utm_medium=cta&utm_content=multimodal_rag_tutorial&utm_term=apoorva.joshi)
19
+
*[Obtain the connection string](https://www.mongodb.com/docs/guides/atlas/connection-string/?utm_campaign=devrel&utm_source=third-party-content&utm_medium=cta&utm_content=multimodal_rag_tutorial&utm_term=apoorva.joshi) for your database cluster
20
+
21
+
* Manually set the value of the `SERVERLESS_URL` variable as follows:
0 commit comments