Skip to content

Commit 15f5dc0

Browse files
author
ajosh0504
committed
Updating docs and screenshots
1 parent bd68543 commit 15f5dc0

28 files changed

+107
-26
lines changed

docs/20-dev-env/1-dev-env-setup.mdx

Lines changed: 107 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,154 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
13
import Screenshot from "@site/src/components/Screenshot";
24

35
# 👐 Setup dev environment
46

57
<details>
6-
<summary>🦹 If you are doing this lab as part of a MongoDB GenAI Developer Day, you can continue in the Codespace you previously created.</summary>
8+
<summary>🦹 If you are doing this lab as part of a MongoDB GenAI Developer Day, you can continue in the environment you previously created.</summary>
79

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.
10+
<Tabs groupId="resume lab">
11+
<TabItem value="Instruqt" label="Instruqt">
912

10-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/1-resume-codespace.png" alt="Resume codespace" />
13+
Navigate to the Instruqt lab using [this](http://mdb.link/instruqt-ai) link. Click **Continue** to continue in the sandbox you created previously.
14+
15+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/1-resume-sandbox.png" alt="Resume sandbox" />
16+
17+
In the Explorer menu, navigate to `genai-devday-notebooks` > `notebooks` > `ai-rag-lab.ipynb` This is the Jupyter Notebook you will be using throughout this lab.
18+
19+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/2-nav-notebook.png" alt="Navigate to the notebook" />
20+
</TabItem>
21+
22+
<TabItem value="GitHub Codespaces" label="GitHub Codespaces">
23+
24+
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 codespace you created previously.
25+
26+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/1-resume-codespace.png" alt="Resume codespace" />
1127

1228
Give the codespace a few seconds to restart. When files appear in the Explorer tab, click on the file named `ai-rag-lab.ipynb` under `notebooks`. This is the Jupyter Notebook you will be using throughout this lab.
1329

14-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/2-nav-notebook.png" alt="Navigate to the notebook" />
30+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/2-nav-notebook.png" alt="Navigate to the notebook" />
31+
</TabItem>
32+
33+
<TabItem value="Local" label="Local">
34+
35+
Open the browser tab where your Jupyter Server from before is running and open the file named `ai-rag-lab.ipynb`.
36+
37+
<Screenshot url="localhost:8888/tree" src="img/screenshots/20-dev-env/1-dev-env-setup/local/1-nav-notebook.png" alt="Jupyter Notebook" />
38+
39+
</TabItem>
40+
</Tabs>
1541
</details>
1642

1743
:::tip
1844
In this lab, we will be using Jupyter Notebooks, which is an interactive Python environment. If you are new to Jupyter Notebooks, use [this](https://mongodb-developer.github.io/vector-search-lab/docs/dev-env/jupyter-notebooks) guide to familiarize yourself with the environment.
1945
:::
2046

21-
## Option 1: GitHub Codespaces
47+
<Tabs groupId="setup options">
48+
<TabItem value="Instruqt" label="Instruqt">
2249

23-
You will be working in GitHub Codespaces throughout this lab. A codespace is a cloud-hosted, containerized development environment that comes pre-configured with all the tools you need to run this lab.
50+
Instruqt is a lab platform that provides cloud-based sandboxes which come pre-configured with all the tools you need to run this lab.
2451

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.
52+
**Navigate to the Instruqt lab using [this](http://mdb.link/instruqt-ai) link.** Fill out the form that appears and click **Submit and access**.
2653

27-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/3-create-codespace.png" alt="Start a codespace" />
54+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/3-submit-form.png" alt="Submit Instruqt form" />
2855

29-
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
56+
Click **Start** to launch the lab environment.
57+
58+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/4-start-sandbox-setup.png" alt="Start Instruqt sandbox" />
59+
60+
You should see a screen with a purple progress bar indicating that Instruqt is preparing a sandbox with all the required libraries for this lab and a MongoDB cluster.
61+
62+
Once this is done, you should see a Start button at the bottom right of the screen. Click this to enter the lab.
63+
64+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/5-start-lab.png" alt="Start Instruqt lab" />
3065

3166
### Connect to the MongoDB cluster
3267

33-
Once the environment is built, you will be prompted to connect to the MongoDB cluster via MongoDB's VSCode extension. This will allow you to visualize the data that we will import into the cluster later in the lab, directly from the VSCode IDE.
68+
Let's first connect to the MongoDB cluster that was created for you. This will allow you to view data we import into the cluster later in the lab, directly from the VSCode IDE.
3469

35-
To connect to the cluster, click the leaf icon in the left navigation bar of the IDE.
70+
To do this, click the leaf icon in the left navigation bar of the IDE. This is MongoDB's VSCode extension.
3671

37-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/4-click-leaf.png" alt="Click leaf icon" />
72+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/6-click-leaf.png" alt="Click leaf icon" />
3873

39-
Under **Connections**, click the _mongodb:27017_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
74+
Under **Connections**, click the _Local MongoDB Atlas_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
4075

41-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/5-connect-cluster.png" alt="Connect to the cluster" />
76+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/7-connect-cluster.png" alt="Connect to the cluster" />
4277

43-
If the connection was successful, you should see the message **Connected to: mongodb:27017** with a green indicator.
78+
If the connection was successful, you should see a green leaf and a "connected" message appear around the _Local MongoDB Atlas_ connection.
4479

4580
You will also see the default databases in the cluster appear under **Connections**. Any additional databases we create during the lab will also appear here.
4681

47-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/6-connection-successful.png" alt="Connection successful" />
82+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/8-connection-successful.png" alt="Connection successful" />
4883

4984
### Jupyter Notebook setup
5085

5186
You will be filling code in a Jupyter Notebook during this lab, so let's get set up with that next!
5287

53-
Within the codespace, click on the files icon in the left navigation bar of the IDE. In the Explorer menu, under `notebooks`, click on the file named `ai-rag-lab.ipynb` to open the Jupyter Notebook for this lab.
88+
Within the sandbox, click on the files icon in the left navigation bar of the IDE. In the Explorer menu, navigate to `genai-devday-notebooks` > `notebooks` > `ai-rag-lab.ipynb` to open the Jupyter Notebook for this lab.
5489

55-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/7-nav-notebook.png" alt="Navigate to the notebook" />
90+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/2-nav-notebook.png" alt="Navigate to the notebook" />
5691

5792
Next, select the Python interpreter by clicking **Select Kernel** at the top right of the IDE.
5893

59-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/8-select-kernel.png" alt="Select kernel" />
94+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/9-select-kernel.png" alt="Select kernel" />
6095

6196
In the modal that appears, click **Python environments...** and select the interpreter that is marked as **Recommended** or **Global Env**.
6297

63-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/9-python-env-modal.png" alt="Select Python Environments" />
98+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/10-python-env-modal.png" alt="Select Python Environments" />
6499

65-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/10-select-recommended.png" alt="Select recommended interpreter" />
100+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/11-select-recommended.png" alt="Select recommended interpreter" />
66101

67102
That's it! You're ready for the lab!
68103

69-
## Option 2: Run locally
70-
71-
:::caution
72-
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.
104+
:::tip
105+
Notice that this documentation website is also linked in the `RAG Lab Instructions` tab of your Instruqt sandbox. Feel free to access the documentation from there instead for the rest of the lab.
73106
:::
74107

108+
</TabItem>
109+
110+
<TabItem value="GitHub Codespaces" label="GitHub Codespaces">
111+
112+
A codespace is a cloud-hosted development environment from GitHub, that comes pre-configured with all the tools you need to run this lab.
113+
114+
**To create a codespace, 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.
115+
116+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/3-create-codespace.png" alt="Start a codespace" />
117+
118+
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
119+
120+
### Connect to the MongoDB cluster
121+
122+
Let's first connect to the MongoDB cluster that was created for you. This will allow you to view data we import into the cluster later in the lab, directly from the VSCode IDE.
123+
124+
To do this, click the leaf icon in the left navigation bar of the IDE. This is MongoDB's VSCode extension.
125+
126+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/4-click-leaf.png" alt="Click leaf icon" />
127+
128+
Under **Connections**, click the _Local MongoDB Atlas_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
129+
130+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/5-connect-cluster.png" alt="Connect to the cluster" />
131+
132+
If the connection was successful, you should see a green leaf and a "connected" message appear around the _Local MongoDB Atlas_ connection.
133+
134+
You will also see the default databases in the cluster appear under **Connections**. Any additional databases we create during the lab will also appear here.
135+
136+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/6-connection-successful.png" alt="Connection successful" />
137+
138+
### Jupyter Notebook setup
139+
140+
You will be filling code in a Jupyter Notebook during this lab, so let's get set up with that next!
141+
142+
Within the codespace, click on the files icon in the left navigation bar of the IDE. In the Explorer menu, under `notebooks`, click on the file named `ai-rag-lab.ipynb` to open the Jupyter Notebook for this lab.
143+
144+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/2-nav-notebook.png" alt="Navigate to the notebook" />
145+
146+
That's it! You're ready for the lab!
147+
148+
</TabItem>
149+
150+
<TabItem value="Local" label="Local">
151+
75152
To run the lab locally, follow the steps below:
76153

77154
* Clone the [GitHub repo](https://github.com/mongodb-developer/genai-devday-notebooks.git) for this lab by executing the following command from the terminal:
@@ -108,4 +185,8 @@ jupyter notebook
108185

109186
* In the browser tab that pops up, open the file named `ai-rag-lab.ipynb`.
110187

111-
<Screenshot url="localhost:8888/tree" src="img/screenshots/20-dev-env/1-dev-env-setup/11-jupyter-notebook.png" alt="Jupyter Notebook" />
188+
<Screenshot url="localhost:8888/tree" src="img/screenshots/20-dev-env/1-dev-env-setup/local/1-nav-notebook.png" alt="Jupyter Notebook" />
189+
190+
</TabItem>
191+
192+
</Tabs>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)