Using VSCode at UChicago
For general information about VSCode and its features, see the VSCode Overview.
This page covers UChicago-specific setup instructions for using VSCode with the UChicago Analysis Facility.
Connecting VSCode to JupyterLab Kernel
You can follow these steps to connect your Visual Studio Code to a JupyterLab kernel that you launch with BinderHub on the University of Chicago Analysis Facility (UC AF). This allows you to work on your Jupyter notebooks using VS Code while utilizing the computational resources of UC AF.
Note
Make sure your BinderHub server is running and remains active while you are using VS Code to connect.
Steps
-
Launch Your Server with BinderHub:
- Follow How to launch a notebook to start a JupyterLab server from BinderHub.
- Your running servers are listed on the JupyterHub home page.
-
Get an API Token:
- Visit
https://jupyterhub.af.uchicago.edu/hub/token,
create a token, and request the
access:serversscope (oraccess:servers!user=<your-username>to restrict it to your own servers). - Save the token; you will not see it again. The same token keeps working for servers you launch later.
- Visit
https://jupyterhub.af.uchicago.edu/hub/token,
create a token, and request the
-
Get the Server URL:
- Copy the address of your running server from your browser, up to and not
including
/lab. BinderHub launches a named server, so this looks likehttps://jupyterhub.af.uchicago.edu/user/<your-username>/<server-name>/. - Append your token to it, so it looks like
https://jupyterhub.af.uchicago.edu/user/<your-username>/<server-name>/?token=<your-api-token>.
- Copy the address of your running server from your browser, up to and not
including
-
Configure VS Code:
- Open Visual Studio Code.
- Install the Python and Jupyter extensions if you haven't already.
-
Select Your Server and Kernel:
- Open the notebook file you wish to work on in VS Code.
- Click on the kernel picker in the top right corner of the notebook editor
- Click the kernel dropdown → click "Select Another Kernel..." → then "Existing Jupyter Server...".
- Paste your server URI there.
- Select the kernel you want to use from your JupyterLab.
-
Using the Remote Kernel:
- Once the correct Kernel is selected, you can execute your notebook code within VS Code, utilizing the UC AF's computational resources.
- If you encounter issues, ensure that VS Code is allowed through your firewall if applicable, and your network allows communicating with the UC AF nodes.
- If your server is stopped (idle servers are stopped after 24 hours), launch it again from BinderHub and reconnect with the same token.
Getting help
Need help?
See our Getting Help page for support options and how to reach the ATLAS AF team.