3 ms·
You can create a unikernel with Python - it's one of Unikraft's examples, but you won't be able to pip install modules out of the box. Unikraft is good if you
by jansommer 5y ago
You can create a unikernel with Python - it's one of Unikraft's examples, but you won't be able to pip install modules out of the box.
Unikraft is good if you want to run untrusted code, giving a way for developers to extend functionality on your platform in Python (or JavaScript if you use Ducktape, also in their examples) - kind of like AWS Lambda and the likes. Besides the added security from running in a virtual machine, unikernels boot extremely fast. Without applying any optimizations, I have a QuickJS unikernel that boots, runs JavaScript and shuts down within 400ms (running in Windows -> VMWare -> Linux -> KVM+QEMU). This performance would be hard to get with Docker and a Linux distro.
- nderjung 5y agoThis does not mean you cannot still use pip to manage Python dependencies. Simply package all the required addditional libraries from pip through a virtualenv/venv, and package this in the filesystem that the python3 Unikraft unikernel reads on boot. For more details, check out the library for details: https://github.com/unikraft/lib-python3 https://github.com/unikraft/lib-python3
- jansommer 5y agoThat's awesome, I stand corrected!