Open pwalski opened 8 months ago
This task and recent discussion about OCI support was an excuse to check how Automatic could be started on Windows in an isolated environment.
There is a Windows fork of runc
(low level lib for running OCI containers) called runhcs
.
https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/containerd#runhcs
It supports both Hyper-V
virtualization and Windows Process Containers.
Hyper-V
is disabled by default, so it is not an option.
Process isolation allows to hide fs, network, and obviously process space.
https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container#process-isolation
It also allows to share devices (GPU)
https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/hardware-devices-in-containers#what-devices-are-supported
I know there is a nvidia-container-runtime
allowing to use GPU on containers on Windows, but I think it is required for containerd
runtime (so docker, k8s, etc.) to support GPU on linux containers.
It seems it is possible to just run runhcs
in a directory with config.json
OCI container descriptor to start a container (without requirement to install and start any daemon as in case of containerd/docker).
It could be worth to check if it will be possible to start this way Automatic in container with Windows baseimage and whether it will be able to access GPU.
In case of misconfigured model Automatic API returns error response including host filesystem paths: