Re:Unikraft – Fast, Specialized Unikernels
by aitchnyu on Tuesday April 27, 2021 @09:21AM
(#26955448)
Can anybody ELI15 what does a Unikraft contains compared to Docker running a Linux distro? Can it install pip (Python) packages with compiled C modules, create and read temporary files, and other container things?
[ Parent
| on HN ]
Re:Unikraft – Fast, Specialized Unikernels
by jansommer on Tuesday April 27, 2021 @10:31AM
(#26956369)
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.
Re:Unikraft – Fast, Specialized Unikernels
by nderjung on Tuesday April 27, 2021 @11:41AM
(#26957452)
This 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
Re:Unikraft – Fast, Specialized Unikernels
by jansommer on Tuesday April 27, 2021 @01:33PM
(#26958981)
That's awesome, I stand corrected!
I don't know about Unikraft, but as far as I know, a unikernel is an application specific OS.
Think of it as if Node.js could be directly installed on a PC and no Linux is needed.
Re:Unikraft – Fast, Specialized Unikernels
by felipehuici on Tuesday April 27, 2021 @05:30PM
(#26961861)
Yes, correct, Unikraft generates an OS that is customized to the needs of particular applications.