Walkthrough: Using the sample notebooks remotely from Windows (Anaconda 3)
In this article you'll learn how to use systemathics/notebook-examples with Ganymede public endpoints from Windows
The sample notebooks are directly usable in the Web hosted Jupyter Lab. More advanced users can also execute them locally on their computer and plug them to Ganymede public endpoints from Microsoft Windows.
This walkthrough is 100% Windows based and uses the Anaconda 3 popular data science environment .
Step 1 : Install Anaconda 3
The objective is to use the Anaconda 3 popular data science environment, shipping Jupyter Lab and Python by default.
Download the installation package from https://repo.anaconda.com/archive/Anaconda3-2021.11-Windows-x86_64.exe and follow the installation steps.
Step 2 : Add dotnet and dotnet interactive support (for C# and F#)
You can skip this step if you don't intend to use C#/F#.
Download and install latest dotnet sdk 6.0 from https://dotnet.microsoft.com/en-us/download/dotnet/6.0
From "Anaconda PowerShell prompt".
dotnet tool install --global Microsoft.dotnet-interactive dotnet interactive jupyter install
Step 3 : Install Systemathics gRPC API support and dependencies
The objective is to install Ganymede gRPC API and minimal dependencies.
From "Command Prompt" window, use pip to install systemathics.api package and dependencies.
pip install wheel python-certifi-win32 systemathics.apis
systemathics.api contains auto generated client stubs and request/response types to help access Ganymede gRPC API, along with token_helpers and channel_helpers.
python-certifi-win32 is required to import certificate authorities from Windows certificates store, this is crucial in order for Ganymede Let's Encrypt certificates to be trusted by Python code. The imported certificates are in your user directory under %USERPROFILE%\AppData\Local\.certifi\cacert.pem.
Step 4 : Get systemathics/notebook-examples from github
Any git flavour of your choosing:
- Using git from your "Conda PowerShell prompt"
conda install git git clone https://github.com/systemathics/notebook-examples/tree/prod
- Using GitHub CLI
gh repo clone systemathics/notebook-examples
- Using GitHub Desktop
- Or any other git based tool of your liking
The resulting folder should look like this:
Step 5 : Create an authentication token from the dashboard
To authenticate against Ganymede API, you have to obtain a token. Go to tokens in your dashboard, then click "Create token".
Input a name for your token, then click "Save"
a dialog will then appear, with detailed information about the newly created token.
Ensure to keep the client secret handy as it won't be visible anymore after closing the dialog.
Your newly created token is now active.
Please note that this token is persistent across sessions, logging in and out won't affect it. To remove access you need to delete it manually.
Step 6 : Edit remoteaccess/env.ps1
Fill CLIENT_ID and CLIENT_SECRET environment variables, they are required to get a JWT authorization token suitable to accessing Ganymede public endpoints.
Step 7 : Ready to go
Everything is now ready to go.
Still from "Anaconda PowerShell prompt" window, just execute .\remoteaccess\jupyter-lab-anaconda-windows.ps1,
it launches a Jupyter lab with the right environment to access Ganymede remotely.