Thinkube Models
Build a notebook environment
Start from agent-dev or fine-tuning, add the packages you need, and get a kernel built for every architecture in your cluster
- Level
- beginner
- Time
- 30 min
- Risk
- low
- Updated
- 2026-10-04
Overview
Basic idea
A notebook environment is a Python virtual environment that Thinkube Notebooks offers as a kernel. Two come with the platform: agent-dev for building with models and agents, and fine-tuning for training. When you need other packages, you build an environment of your own instead of installing into those.
-
From a template. A new environment copies the package list of
agent-devorfine-tuning, then adds yours. -
Built for your hardware. The environment is built on a GPU node of each architecture, and copied to the other GPU nodes.
-
PyTorch from the image. Every environment uses the PyTorch the notebook image was built with, so compiled extensions work.
-
A kernel by name. The environment appears as a kernel with its name, in every notebook server started after the build.
What you’ll accomplish
You build the environment data-tools, which is agent-dev plus polars, and run a notebook with its kernel.
What to know before starting
Required
-
Run notebooks from your agent, watched or unattended: the run that uses the new kernel.
Optional
-
Thinkube Models: the servers and the two built-in environments.
Instructions
Step 1. Create the environment
The name starts with a letter and holds letters, digits, hyphens and underscores. agent-dev and fine-tuning are taken by the built-in environments.
Ask your agent:
› make a notebook environment called data-tools from agent-dev and add polars
Or by hand: in Thinkube Control open Jupyter Kernels. Under Create New Kernel type data-tools as Kernel Name, pick agent-dev as Base Template and choose Create. Then under Kernels choose Edit packages on data-tools and add polars.
Expected output, from the reference run:
id: 12276bdc-1aa4-488b-8ae8-608e26700fe6 name: data-tools packages: ipykernel, transformers, ... anthropic, tk-llm[openai], ... langchain==1.4.0, ... ag2[openai]==0.10.2, ... polars status: pending
Step 2. Build it
Ask your agent:
› build data-tools
The agent reports the status until the build ends. pip shows no progress while it installs.
Or by hand: under Kernels, choose Build kernel (the play button) on data-tools.
Expected output, from the reference run:
status: building message: Build started on a GPU node; poll get_jupyter_venv for its status
and at the end:
status: success output: Build completed. Log: /tmp/thinkube-venvs/data-tools/build-20260917-000554.log venv_path: /var/lib/jupyterhub-venvs/custom/data-tools architectures_built: amd64, arm64 duration: 433.5
Step 3. Run a notebook with the new kernel
A notebook server registers the kernels that exist when it starts. An unattended run starts a server of its own, so it has the new kernel at once.
Ask your agent:
› create try-data-tools.ipynb that imports polars and filters a small table, and run it unattended on tkamd2 with the data-tools kernel
Replace tkamd2 with one of your nodes.
Expected output, from the reference run:
status: completed
completed_cells: 2 of 2
cell 0: /home/thinkube/venvs/custom/data-tools/amd64
polars 1.44.2
cell 1: shape: (2, 2)
┌─────────┬──────┐
│ node ┆ gpus │
│ --- ┆ --- │
│ str ┆ i64 │
╞═════════╪══════╡
│ tkamd2 ┆ 2 │
│ tkspark ┆ 1 │
└─────────┴──────┘
created_at: 00:15:11 finished_at: 00:16:00
To use the kernel in a server you already have running, stop and start that server: "restart my notebook server on tkamd1".
Step 4. Next steps
To undo: Delete the environment under Jupyter Kernels.
-
Run notebooks from your agent, watched or unattended: watch a run in a Thinkube IDE tab.
-
Call your models from an app or a script: the clients every environment carries.
-
Notebook execution over MCP: the notebook operations.