In this section, we will install the required tools to run our lab scenarios.
Out of the many options to run, manage, and update Jupyter notebooks, we recommend using Visual Studio Code (VSCode) because it has extensions for running and managing IoT devices as well. Install Visual Studio Code , Git and .NET Core SDK (This is required in order to execute the .net console programme in the following sections.) if you do not already have it installed.
-
In Visual Studio Code, install the following extensions:
-
To run the Jupyter notebooks, you will need to have Anaconda installed. If you wish to install Anaconda for all users, read the Anaconda documentation for instructions on how to do so.
[!IMPORTANT]
When installing Anaconda, select the option that adds Anaconda to your Path, by clicking the checkbox on a graphical installation (Windows and Mac) or by typing 'yes' in the terminal where appropriate (Linux).
-
Clone this repository locally into your development PC and open the repository with VSCode.
-
Locate this Readme page in your local repository and continue reading the following sections on VSCode. You can preview Markdown (
.md
) pages by pressingCtrl+Shift+V
to open a full-screen window or by clicking the preview button on the top toolbar in VSCode. For pictures to render on VSCode, you must have the entire EVS folder open in your VSCode workspace. Going forward, we will be using VSCode to run this sample. Please navigate to VSCode to continue.
Once Anaconda is installed, we will be creating a Conda environment to hold all our dependencies for this sample.
-
Open a terminal window in VSCode.
-
Change the relative terminal path to the following: evs/common.
-
In your terminal, run the following command to install all the necessary packages for this sample, including Jupyter.
conda env create --prefix ./evs_conda_env --file environment.yml
[!NOTE] Notice that in this folder, we have a file named environment.yml, which lists all of our dependencies.
-
Close all tabs and relaunch VSCode.
-
If you get a message that says "To activate this environment..." in your terminal window, you can ignore the message.
-
If you get the following message in VSCode, follow the instructions to turn off the
inheritEnv
setting. You can also turn off theinheritEnv
setting by going to your VSCode toolbar and clicking File --> Preferences --> Settings. Then, search forinheritEnv
and uncheck the checkbox.
-
-
Next, set the Python environment in VSCode by using the Command Palette (
Ctrl+Shift+P
) and searching for "Python: Select Interpreter" so that the Conda installation of Python is in use. -
Similarly, set the Python environment to start the Jupyter server by using the Command Palette (
Ctrl+Shift+P
) and searching for "Jupyter: Select Interpreter to start Jupyter server".
[!IMPORTANT] If you are running into issues related to Python package dependencies, you may be using the wrong Python interpreter. You can identify the interpreter on the top right of VSCode, as shown in the image below. The correct Python interpreter should say
Python 3.6.10 64-bit (conda)
. If you do not see this Python interpreter, you can try relaunching VSCode or restarting your development PC.
For additional information about Conda, you can read more about managing Conda environments.
Later in the section we will deploy workloads on Azure Kubernetes Service using Kubectl. As per your development PC Operating system please Install Kubectl.
[!IMPORTANT] Download latest release of kubectl and add the binary to your PATH (system variables)
Validate the installation by running of kubectl "kubectl version" in your vscode terminal.
Because this sample utilizes Azure, you will need an active Azure subscription to run the following sections. If you do not have an active Azure subscription, create an Azure account.
To create Azure services, install the Azure Command Line Interface (version >= 2.7.0) based on your development PC's operating system:
Remember to use the correct terminal for installing the Azure CLI. Even if you already have the Azure CLI installed, you may want to re-install it.
If you are not familiar with running Jupyter notebooks, we recommend getting started with this tutorial on running Jupyter on VSCode.
Return to README page.