mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-27 19:43:34 +00:00
feat: Add support for compose devices mappings (#250)
* feat: Add support for compose `devices` mappings https://docs.docker.com/reference/compose-file/services/#devices ``` services: foo: devices: - "/dev/ttyUSB0:/dev/ttyUSB0" - "/dev/sda:/dev/xvda:rwm" ``` * Lint fix
This commit is contained in:
@@ -17,6 +17,8 @@ type ContainerResources struct {
|
||||
// MemoryReservation is the minimum amount of memory (in bytes) the container needs to run efficiently.
|
||||
// TODO: implement a placement constraint that checks available memory on machines.
|
||||
MemoryReservation int64
|
||||
// Device mappings for direct access to host devices
|
||||
DeviceMappings []container.DeviceMapping
|
||||
// Device reservations/requests for access to things like GPUs
|
||||
DeviceReservations []container.DeviceRequest
|
||||
// Ulimits defines the resource limits for the container.
|
||||
|
||||
Reference in New Issue
Block a user