5 ms·
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
by aitchnyu 6y ago
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?
- k__ 6y agoI 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.
- felipehuici 6y agoYes, correct, Unikraft generates an OS that is customized to the needs of particular applications.
- jansommer 6y agoYou 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 6y 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 6y agoThat's awesome, I stand corrected!