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
@@ -6,59 +8,111 @@ import Screenshot from "@site/src/components/Screenshot";
6
8
In this lab, we will be using Jupyter Notebooks, which is an interactive Python environment. If you are new to Jupyter Notebooks, use <ahref="./jupyter-notebooks">this</a> guide to familiarize yourself with the environment.
7
9
:::
8
10
9
-
## Option 1: GitHub Codespaces
11
+
You have a few different options to run this lab. **Our preferred platform is Instruqt**.
10
12
11
-
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.
13
+
If for some reason, you are unable to access the lab through Instruqt, try GitHub Codespaces. If neither of these work, or if you really, really, really want a local installation, only then run the lab locally.
12
14
13
-
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.
15
+
<TabsgroupId="setup options">
16
+
<TabItemvalue="Instruqt"label="Instruqt">
14
17
15
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/2-dev-env-setup/1-create-codespace.png"alt="Start a codespace" />
18
+
Instruqt is a lab platform that provides cloud-based sandboxes which come pre-configured with all the tools you need to run this lab.
16
19
17
-
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
20
+
**Navigate to the Instruqt lab using [this](http://mdb.link/instruqt-ai) link.** Fill out the form that appears and click **Submit and access**.
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.
29
+
30
+
Once this is done, you should see a Start button at the bottom right of the screen. Click this to enter the lab.
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.
36
+
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.
22
37
23
-
To connect to the cluster, click the leaf icon in the left navigation bar of the IDE.
38
+
To do this, click the leaf icon in the left navigation bar of the IDE. This is MongoDB's VSCode extension.
Under **Connections**, click the _mongodb:27017_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
42
+
Under **Connections**, click the _Local MongoDB Atlas_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
28
43
29
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/2-dev-env-setup/3-connect-cluster.png"alt="Connect to the cluster" />
44
+
<Screenshoturl="https://play.instruqt.com"src="img/screenshots/20-dev-env/2-dev-env-setup/instruqt/5-connect-cluster.png"alt="Connect to the cluster" />
30
45
31
-
If the connection was successful, you should see the message **Connected to: mongodb:27017** with a green indicator.
46
+
If the connection was successful, you should see a green leaf and a "connected" message appear around the _Local MongoDB Atlas_ connection.
32
47
33
48
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.
You will be filling code in a Jupyter Notebook during this lab, so let's get set up with that next!
40
55
41
-
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`vector-search-lab.ipynb` to open the Jupyter Notebook for this lab.
56
+
Within the codespace, click on the files icon in the left navigation bar of the IDE. In the Explorer menu, navigate to `genai-devday-notebooks` > `notebooks` >`vector-search-lab.ipynb` to open the Jupyter Notebook for this lab.
42
57
43
-
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/2-dev-env-setup/5-nav-notebook.png"alt="Navigate to the notebook" />
58
+
<Screenshoturl="https://play.instruqt.com"src="img/screenshots/20-dev-env/2-dev-env-setup/instruqt/7-nav-notebook.png"alt="Navigate to the notebook" />
44
59
45
60
Next, select the Python interpreter by clicking **Select Kernel** at the top right of the IDE.
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.
A codespace is a cloud-hosted development environment from GitHub, that comes pre-configured with all the tools you need to run this lab.
78
+
79
+
**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.
80
+
81
+
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/2-dev-env-setup/codespaces/1-create-codespace.png"alt="Start a codespace" />
82
+
83
+
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
84
+
85
+
### Connect to the MongoDB cluster
86
+
87
+
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.
88
+
89
+
To do this, click the leaf icon in the left navigation bar of the IDE. This is MongoDB's VSCode extension.
Under **Connections**, click the _Local MongoDB Atlas_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
94
+
95
+
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/2-dev-env-setup/codespaces/3-connect-cluster.png"alt="Connect to the cluster" />
96
+
97
+
If the connection was successful, you should see a green leaf and a "connected" message appear around the _Local MongoDB Atlas_ connection.
98
+
99
+
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.
You will be filling code in a Jupyter Notebook during this lab, so let's get set up with that next!
106
+
107
+
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 `vector-search-lab.ipynb` to open the Jupyter Notebook for this lab.
108
+
109
+
<Screenshoturl="https://github.com/codespaces"src="img/screenshots/20-dev-env/2-dev-env-setup/codespaces/5-nav-notebook.png"alt="Navigate to the notebook" />
110
+
111
+
That's it! You're ready for the lab!
112
+
113
+
</TabItem>
114
+
115
+
<TabItemvalue="Run locally"label="Run locally">
62
116
63
117
To run the lab locally, follow the steps below:
64
118
@@ -96,4 +150,8 @@ jupyter notebook
96
150
97
151
* In the browser tab that pops up, open the file named `vector-search-lab.ipynb`.
0 commit comments