Lupine for VS Code
Run the current Python file on your workspace machine while Lupine forwards its GPU calls to a remote GPU. This works in local folders, GitHub Codespaces, Dev Containers, and Remote SSH workspaces. The extension and Lupine CLI must be installed on the machine that holds the workspace.
Try it
- Open
clients/vscode as a folder in VS Code, run npm install, then press F5 to compile and launch an Extension Development Host.
- Run Lupine: Sign In from the Command Palette. If the CLI is missing, the extension offers to install the checksummed release in its workspace environment, then opens the browser through VS Code and reports when sign-in completes. For local development in this repository,
mise run build:cli writes bin/lupine; set Lupine: Executable Path to its absolute path.
- Open a saved
.py file in a folder workspace and use the play icon or Lupine: Run Python File with Lupine from the Command Palette. On Linux, select the Python interpreter you want to use. The file also has a context menu action.
The run appears as a VS Code task, so its output and cancellation use the usual task terminal. The working directory is the file's workspace folder, with optional GPU and region flags from settings.
Before a run, the extension checks the CLI's authentication status. If sign-in is required, it offers to open the Lupine login page and resumes the run after the CLI has saved the credentials. The token remains in the CLI's state directory and is never stored by the extension.
On Linux (including WSL and Codespaces), a file under a project containing uv.lock runs through uv run, which syncs the project's dependencies before starting Python. If uv is not on VS Code's PATH, the extension uses the project's synced .venv/bin/python instead. Run uv sync in the project after changing dependencies, and declare packages such as torch in pyproject.toml. If the environment lives elsewhere, set Lupine: Python Path to its interpreter. Other Linux files use the interpreter selected by the Microsoft Python extension, or python3 from PATH if that extension is absent. An explicit Python path overrides uv detection and interpreter selection.
On macOS, Lupine mounts the workspace at /workspace in its Linux sidecar, so the extension runs python3 inside that image and passes the file relative to the workspace. The sidecar includes a CUDA-enabled PyTorch build; packages from a Mac virtual environment are not available inside it. A Lupine: Python Path override on macOS must exist inside the sidecar rather than on the Mac.
Run npm test in this directory to compile and run the command tests. The TypeScript build is packaged automatically when creating a VSIX. This extension has no runtime npm dependencies.