Skip to content

Commit

Permalink
Fix: CPU features required for execution could not be specified. (#100)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hoh committed Jun 21, 2024
1 parent a3217ec commit caef895
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aleph_message/models/execution/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ class CpuProperties(HashableModel):
vendor: Optional[Union[Literal["AuthenticAMD", "GenuineIntel"], str]] = Field(
default=None, description="CPU vendor. Allows other vendors."
)
# Features described here share the naming conventions of CPU flags (/proc/cpuinfo)
# but differ in that they must be actually available to the VM.
features: Optional[List[str]] = Field(
default=None,
description="CPU features required by the virtual machine. Examples: 'sev', 'sev_es', 'sev_snp'.",
)

class Config:
extra = Extra.forbid
Expand Down

0 comments on commit caef895

Please sign in to comment.