When you select it, a new interactive Python tab will be opened, connected to the remote server. In VS Code, raise the Command Palette… again and start to search for Pythin: Show Python Interactive window. When you see the notebook server (no need to log in, unless you want to the token is letmein, or whatever you set it to in the User data form), you can enter the following into the VS Code server URI form using the IP address of your server: Copy this address and paste it into a browser location bar - this is just to help us monitor when the Jupyter server is ready (it will probably take a minute or two to download and install the notebook container into the server). The server will be launched and after a moment or two it will be assigned a public IP address. You can now create your server (optionally naming it for convenience): There’s an example recipe here - you’ll need to create as one click app a Docker server, select your region and server size (a cheap 2GB server will be plenty), and then enter the following into the User data area:ĭocker run -d -rm -p 80:8888 -e JUPYTER_TOKEN=letmein jupyter/minimal-notebook If you don’t have a Digital Ocean account you can create one here and get $100 free credit, which is way more than enough for this demo.Ĭreating a server is quite straightforward. Select the Type in the URI to connect to a running Jupyter server option:Īnd you’ll be prompted for a URI. You’ll be prompted with another dialogue. Now let’s go hunting for the connection dialogue…įrom the Command Palette, search for Python: Specify Jupyter server URI (there may be an easier way: I’ve spent all of five minutes with this environment!): If you haven’t got VS Code installed, you’ll need to download and install it. Navigating the VS Code UI is probably the hardest part of connecting it to a Jupyter kernel, remote or local, so let’s see what’s involved. Microsoft Visual Studio Code is an electron app, reminiscent-ish of Atom editor (maybe?) that’s available as a quite compact download across Windows, Mac and Linux platforms. Despite seeing talk of Jupyter notebook integration in Microsoft Visual Studio (VS) Code, I didn’t do much more than pass it on (via the Tracking Juptyer newsletter) because I though it was part of a heavyweight Visual Studio IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |