Implement real Jupyter backend with jupyter-client
- Replaced mock exec() implementation with real Jupyter protocol - Uses jupyter-client (host) to connect to ipykernel (container) via ZMQ - 1:1 mapping: one container per session, one kernel per container - Proper Jupyter message protocol for code execution - Kernel lifecycle management (start, execute, shutdown, restart) - Namespace inspection via introspection code - Idle kernel cleanup - Connection file management - Backed up old implementation as kernel_old.py TODO: - Container image needs ipykernel installed - Need to implement proper port mapping for ZMQ - Need to mount connection file into container - Add better kernel readiness check - Implement restart_kernel properly with KernelManager - Write tests
This commit is contained in:
parent
372af75b90
commit
244a3e5574
6 changed files with 940 additions and 253 deletions
|
|
@ -9,6 +9,7 @@ authors = [
|
|||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
"fastmcp>=2.14.5",
|
||||
"jupyter-client>=8.8.0",
|
||||
"podman>=5.7.0",
|
||||
"pydantic>=2.12.5",
|
||||
"pyyaml>=6.0.3",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue