From cec329fe738163c05bbccd1ed64f580abfd493bc Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Wed, 29 May 2024 20:03:29 +0200 Subject: [PATCH] Fix: CPU features required for execution could not be specified. This allows the user to specify CPU features the CPU that must be available in order to run the VM. This should help with automatic and manual scheduling to the right machines. --- aleph_message/models/execution/environment.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aleph_message/models/execution/environment.py b/aleph_message/models/execution/environment.py index 1e97073..8b6a428 100644 --- a/aleph_message/models/execution/environment.py +++ b/aleph_message/models/execution/environment.py @@ -77,6 +77,10 @@ class CpuProperties(HashableModel): vendor: Optional[Union[Literal["AuthenticAMD", "GenuineIntel"], str]] = Field( default=None, description="CPU vendor. Allows other vendors." ) + # Features described here differ from the CPU flags (/proc/cpuinfo) since they must be actually available to the VM. + features: Optional[List[str]] = Field( + default=None, description="CPU features required. Examples: 'avx2', 'sev_es', 'sev_snp'.", + ) class Config: extra = Extra.forbid