innovationOUtside / tm351vm-binder

See if we can generate a Binder/repo2docker build of the TM351 VM
MIT License
7 stars 4 forks source link

Accessing the TM351 VCE from VS Code on host #29

Open psychemedia opened 4 years ago

psychemedia commented 4 years ago

We can run simple notebooks within the VS Code editor on host against the TM351 Python environment using the VS Code Python extension (see also the Jupyter support documentation for that extension).

Note that this is NOT the recommended way of running notebooks, and not all notebooks may run successfully in VS Code, particular where we make use of widgets of notebook extensions, but we are interested in what the experience of using TM351 notebooks via VS Code is like...

If the default TM351 virtual computing environment is running, from the command palette, search for Python: specify local or remote Jupyter server for connections, then select Existing (specify the URI of an existing server) and use the URL: http://localhost:35180/?token=letmein

You should then be able to run the notebooks in VS Code. (See also these early notes on running course containers using Digital Ocean remote servers.)

We could probably provide a default TM351.code-workspace file to help set up the required connection string. For example:

{
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {
        "python.dataScience.jupyterServerURI": "http://localhost:35180/?token=letmein"
    }
}

See also:

psychemedia commented 4 years ago

Note that we can also run VS code inside the notebook server container. For example, betatim/vscode-binder, dirkcgrunwald/jupyter_codeserver_proxy- (via the Colorado-CompSci-Ugrad/csel-per-class-jupyter-containers repo) and IllumiDesk/illumidesk-vscode-proxy are various takes on jupyter-server-proxy for a browserfied VS Code service running inside the notebook server container. That said, maybe the properly open licensed VSCodium would be a better bet?