diff --git a/library/2.0.32/__init__.py b/library/2.0.33/__init__.py similarity index 100% rename from library/2.0.32/__init__.py rename to library/2.0.33/__init__.py diff --git a/library/2.0.32/configs.py b/library/2.0.33/configs.py similarity index 100% rename from library/2.0.32/configs.py rename to library/2.0.33/configs.py diff --git a/library/2.0.32/container.py b/library/2.0.33/container.py similarity index 100% rename from library/2.0.32/container.py rename to library/2.0.33/container.py diff --git a/library/2.0.32/depends.py b/library/2.0.33/depends.py similarity index 100% rename from library/2.0.32/depends.py rename to library/2.0.33/depends.py diff --git a/library/2.0.32/deploy.py b/library/2.0.33/deploy.py similarity index 100% rename from library/2.0.32/deploy.py rename to library/2.0.33/deploy.py diff --git a/library/2.0.32/deps.py b/library/2.0.33/deps.py similarity index 100% rename from library/2.0.32/deps.py rename to library/2.0.33/deps.py diff --git a/library/2.0.32/device.py b/library/2.0.33/device.py similarity index 100% rename from library/2.0.32/device.py rename to library/2.0.33/device.py diff --git a/library/2.0.32/devices.py b/library/2.0.33/devices.py similarity index 93% rename from library/2.0.32/devices.py rename to library/2.0.33/devices.py index ae22c79d2e..b6139371ee 100644 --- a/library/2.0.32/devices.py +++ b/library/2.0.33/devices.py @@ -27,6 +27,8 @@ def _auto_add_devices_from_values(self): if resources.get("gpus", {}).get("use_all_gpus", False): self.add_device("/dev/dri", "/dev/dri", allow_disallowed=True) + if resources["gpus"].get("kfd_device_exists", False): + self.add_device("/dev/kfd", "/dev/kfd", allow_disallowed=True) # AMD ROCm def add_device(self, host_device: str, container_device: str, cgroup_perm: str = "", allow_disallowed=False): # Host device can be mapped to multiple container devices, diff --git a/library/2.0.32/dns.py b/library/2.0.33/dns.py similarity index 100% rename from library/2.0.32/dns.py rename to library/2.0.33/dns.py diff --git a/library/2.0.32/environment.py b/library/2.0.33/environment.py similarity index 100% rename from library/2.0.32/environment.py rename to library/2.0.33/environment.py diff --git a/library/2.0.32/error.py b/library/2.0.33/error.py similarity index 100% rename from library/2.0.32/error.py rename to library/2.0.33/error.py diff --git a/library/2.0.32/formatter.py b/library/2.0.33/formatter.py similarity index 100% rename from library/2.0.32/formatter.py rename to library/2.0.33/formatter.py diff --git a/library/2.0.32/functions.py b/library/2.0.33/functions.py similarity index 100% rename from library/2.0.32/functions.py rename to library/2.0.33/functions.py diff --git a/library/2.0.32/healthcheck.py b/library/2.0.33/healthcheck.py similarity index 100% rename from library/2.0.32/healthcheck.py rename to library/2.0.33/healthcheck.py diff --git a/library/2.0.32/labels.py b/library/2.0.33/labels.py similarity index 100% rename from library/2.0.32/labels.py rename to library/2.0.33/labels.py diff --git a/library/2.0.32/notes.py b/library/2.0.33/notes.py similarity index 100% rename from library/2.0.32/notes.py rename to library/2.0.33/notes.py diff --git a/library/2.0.32/portal.py b/library/2.0.33/portal.py similarity index 100% rename from library/2.0.32/portal.py rename to library/2.0.33/portal.py diff --git a/library/2.0.32/portals.py b/library/2.0.33/portals.py similarity index 100% rename from library/2.0.32/portals.py rename to library/2.0.33/portals.py diff --git a/library/2.0.32/ports.py b/library/2.0.33/ports.py similarity index 100% rename from library/2.0.32/ports.py rename to library/2.0.33/ports.py diff --git a/library/2.0.32/render.py b/library/2.0.33/render.py similarity index 100% rename from library/2.0.32/render.py rename to library/2.0.33/render.py diff --git a/library/2.0.32/resources.py b/library/2.0.33/resources.py similarity index 100% rename from library/2.0.32/resources.py rename to library/2.0.33/resources.py diff --git a/library/2.0.32/restart.py b/library/2.0.33/restart.py similarity index 100% rename from library/2.0.32/restart.py rename to library/2.0.33/restart.py diff --git a/library/2.0.32/storage.py b/library/2.0.33/storage.py similarity index 100% rename from library/2.0.32/storage.py rename to library/2.0.33/storage.py diff --git a/library/2.0.32/sysctls.py b/library/2.0.33/sysctls.py similarity index 100% rename from library/2.0.32/sysctls.py rename to library/2.0.33/sysctls.py diff --git a/library/2.0.32/tests/__init__.py b/library/2.0.33/tests/__init__.py similarity index 100% rename from library/2.0.32/tests/__init__.py rename to library/2.0.33/tests/__init__.py diff --git a/library/2.0.32/tests/test_build_image.py b/library/2.0.33/tests/test_build_image.py similarity index 100% rename from library/2.0.32/tests/test_build_image.py rename to library/2.0.33/tests/test_build_image.py diff --git a/library/2.0.32/tests/test_configs.py b/library/2.0.33/tests/test_configs.py similarity index 100% rename from library/2.0.32/tests/test_configs.py rename to library/2.0.33/tests/test_configs.py diff --git a/library/2.0.32/tests/test_container.py b/library/2.0.33/tests/test_container.py similarity index 100% rename from library/2.0.32/tests/test_container.py rename to library/2.0.33/tests/test_container.py diff --git a/library/2.0.32/tests/test_depends.py b/library/2.0.33/tests/test_depends.py similarity index 100% rename from library/2.0.32/tests/test_depends.py rename to library/2.0.33/tests/test_depends.py diff --git a/library/2.0.32/tests/test_deps.py b/library/2.0.33/tests/test_deps.py similarity index 100% rename from library/2.0.32/tests/test_deps.py rename to library/2.0.33/tests/test_deps.py diff --git a/library/2.0.32/tests/test_device.py b/library/2.0.33/tests/test_device.py similarity index 89% rename from library/2.0.32/tests/test_device.py rename to library/2.0.33/tests/test_device.py index 7455c829f6..c44437367d 100644 --- a/library/2.0.32/tests/test_device.py +++ b/library/2.0.33/tests/test_device.py @@ -93,6 +93,16 @@ def test_automatically_add_gpu_devices(mock_values): assert output["services"]["test_container"]["group_add"] == [44, 107, 568] +def test_automatically_add_gpu_devices_and_kfd(mock_values): + mock_values["resources"] = {"gpus": {"use_all_gpus": True, "kfd_device_exists": True}} + render = Render(mock_values) + c1 = render.add_container("test_container", "test_image") + c1.healthcheck.disable() + output = render.render() + assert output["services"]["test_container"]["devices"] == ["/dev/dri:/dev/dri", "/dev/kfd:/dev/kfd"] + assert output["services"]["test_container"]["group_add"] == [44, 107, 568] + + def test_remove_gpu_devices(mock_values): mock_values["resources"] = {"gpus": {"use_all_gpus": True}} render = Render(mock_values) diff --git a/library/2.0.32/tests/test_dns.py b/library/2.0.33/tests/test_dns.py similarity index 100% rename from library/2.0.32/tests/test_dns.py rename to library/2.0.33/tests/test_dns.py diff --git a/library/2.0.32/tests/test_environment.py b/library/2.0.33/tests/test_environment.py similarity index 100% rename from library/2.0.32/tests/test_environment.py rename to library/2.0.33/tests/test_environment.py diff --git a/library/2.0.32/tests/test_formatter.py b/library/2.0.33/tests/test_formatter.py similarity index 100% rename from library/2.0.32/tests/test_formatter.py rename to library/2.0.33/tests/test_formatter.py diff --git a/library/2.0.32/tests/test_functions.py b/library/2.0.33/tests/test_functions.py similarity index 100% rename from library/2.0.32/tests/test_functions.py rename to library/2.0.33/tests/test_functions.py diff --git a/library/2.0.32/tests/test_healthcheck.py b/library/2.0.33/tests/test_healthcheck.py similarity index 100% rename from library/2.0.32/tests/test_healthcheck.py rename to library/2.0.33/tests/test_healthcheck.py diff --git a/library/2.0.32/tests/test_labels.py b/library/2.0.33/tests/test_labels.py similarity index 100% rename from library/2.0.32/tests/test_labels.py rename to library/2.0.33/tests/test_labels.py diff --git a/library/2.0.32/tests/test_notes.py b/library/2.0.33/tests/test_notes.py similarity index 100% rename from library/2.0.32/tests/test_notes.py rename to library/2.0.33/tests/test_notes.py diff --git a/library/2.0.32/tests/test_portal.py b/library/2.0.33/tests/test_portal.py similarity index 100% rename from library/2.0.32/tests/test_portal.py rename to library/2.0.33/tests/test_portal.py diff --git a/library/2.0.32/tests/test_ports.py b/library/2.0.33/tests/test_ports.py similarity index 100% rename from library/2.0.32/tests/test_ports.py rename to library/2.0.33/tests/test_ports.py diff --git a/library/2.0.32/tests/test_render.py b/library/2.0.33/tests/test_render.py similarity index 100% rename from library/2.0.32/tests/test_render.py rename to library/2.0.33/tests/test_render.py diff --git a/library/2.0.32/tests/test_resources.py b/library/2.0.33/tests/test_resources.py similarity index 100% rename from library/2.0.32/tests/test_resources.py rename to library/2.0.33/tests/test_resources.py diff --git a/library/2.0.32/tests/test_restart.py b/library/2.0.33/tests/test_restart.py similarity index 100% rename from library/2.0.32/tests/test_restart.py rename to library/2.0.33/tests/test_restart.py diff --git a/library/2.0.32/tests/test_sysctls.py b/library/2.0.33/tests/test_sysctls.py similarity index 100% rename from library/2.0.32/tests/test_sysctls.py rename to library/2.0.33/tests/test_sysctls.py diff --git a/library/2.0.32/tests/test_volumes.py b/library/2.0.33/tests/test_volumes.py similarity index 100% rename from library/2.0.32/tests/test_volumes.py rename to library/2.0.33/tests/test_volumes.py diff --git a/library/2.0.32/validations.py b/library/2.0.33/validations.py similarity index 98% rename from library/2.0.32/validations.py rename to library/2.0.33/validations.py index 13f155dfdb..b0dea174b7 100644 --- a/library/2.0.32/validations.py +++ b/library/2.0.33/validations.py @@ -139,7 +139,7 @@ def _valid_path_or_raise(path: str): def allowed_device_or_raise(path: str): - disallowed_devices = ["/dev/dri", "/dev/bus/usb", "/dev/snd"] + disallowed_devices = ["/dev/dri", "/dev/kfd", "/dev/bus/usb", "/dev/snd"] if path in disallowed_devices: raise RenderError(f"Device [{path}] is not allowed to be manually added.") return path diff --git a/library/2.0.32/volume_mount.py b/library/2.0.33/volume_mount.py similarity index 100% rename from library/2.0.32/volume_mount.py rename to library/2.0.33/volume_mount.py diff --git a/library/2.0.32/volume_mount_types.py b/library/2.0.33/volume_mount_types.py similarity index 100% rename from library/2.0.32/volume_mount_types.py rename to library/2.0.33/volume_mount_types.py diff --git a/library/2.0.32/volume_sources.py b/library/2.0.33/volume_sources.py similarity index 100% rename from library/2.0.32/volume_sources.py rename to library/2.0.33/volume_sources.py diff --git a/library/2.0.32/volume_types.py b/library/2.0.33/volume_types.py similarity index 100% rename from library/2.0.32/volume_types.py rename to library/2.0.33/volume_types.py diff --git a/library/2.0.32/volumes.py b/library/2.0.33/volumes.py similarity index 100% rename from library/2.0.32/volumes.py rename to library/2.0.33/volumes.py diff --git a/library/hashes.yaml b/library/hashes.yaml index 744eaf23f4..a470c76c17 100644 --- a/library/hashes.yaml +++ b/library/hashes.yaml @@ -1,3 +1,3 @@ 0.0.1: f074617a82a86d2a6cc78a4c8a4296fc9d168e456f12713e50c696557b302133 1.1.7: d05e43e25b7dc1736be6cc1efa4b9255368aa346e3e7a4350a38440f29b73186 -2.0.32: 4a0bf69cccda322e191eab36ab81ca6d0c8e5d64a0b2fa117c609804b55b86c6 +2.0.33: 167a3532cd10bbb030a484b3b2a84248fad6d59e9ad0338ad0bb6c543dfca949