←back to thread

MCP Run Python

(github.com)
173 points xrd | 1 comments | | HN request time: 0.223s | source
Show context
behnamoh ◴[] No.43718268[source]
So their method of sandboxing Python code is to spin up a JS runtime (deno), run Pyodide on it, and then run the Python code in Pyodide.

Seems a lot of work to me. Is this really the best way to create and run Python sandboxes?

replies(11): >>43718335 #>>43718770 #>>43718841 #>>43719300 #>>43719370 #>>43719672 #>>43719881 #>>43721408 #>>43722369 #>>43723869 #>>43726452 #
simonw ◴[] No.43719672[source]
I've been trying to find a good option for this for ages. The Deno/Pyodide one is genuinely one of the top contenders: https://til.simonwillison.net/deno/pyodide-sandbox

I'm hoping some day to find a recipe I really like for running Python code in a WASM container directly inside Python. Here's the closest I've got, using wasmtime: https://til.simonwillison.net/webassembly/python-in-a-wasm-s...

replies(5): >>43721214 #>>43722664 #>>43724984 #>>43725448 #>>43828320 #
abshkbh ◴[] No.43722664[source]
https://github.com/abshkbh/arrakis

Will come with MacOS support very soon :) Does work on Linux

replies(1): >>43724789 #
Tsarp ◴[] No.43724789[source]
I tried this path and found that MacOS has horrible support on firecracker and similar.
replies(1): >>43730285 #
1. abshkbh ◴[] No.43730285[source]
Crosvm (our original Google project) and its children projects Firecracker, Cloud-Hypervisor are all based on top of "/dev/kvm" i.e. the Linux Virtualization stack.

Apple's equivalent is the Apple Virtualization Framework which exposes kvm like functionality at a higher level.