Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy to host is not implemented for the Docker communication layer #102

Open
Samiboule opened this issue Aug 30, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working enhancement New feature or request planned

Comments

@Samiboule
Copy link
Contributor

Using Docker with benchkit causes this behavior in the gpus example campaign.

Traceback (most recent call last):
  File "/home/user/programming/paae/benchkit/examples/gpus/./campaign_gpus.py", line 186, in <module>
    main()
  File "/home/user/programming/paae/benchkit/examples/gpus/./campaign_gpus.py", line 175, in main
    campaign_suite.run_suite()
  File "/home/user/programming/paae/benchkit/benchkit/campaign.py", line 310, in run_suite
    campaign.campaign_run(other_campaigns_seconds=remaining_seconds, barrier=None)
  File "/home/user/programming/paae/benchkit/benchkit/campaign.py", line 187, in campaign_run
    self._benchmark.run(
  File "/home/user/programming/paae/benchkit/benchkit/benchmark.py", line 590, in run
    self._run_single_run(
  File "/home/user/programming/paae/benchkit/benchkit/benchmark.py", line 1062, in _run_single_run
    self.platform.comm.copy_to_host(f"{temp_record_data_dir}/", f"{record_data_dir}/")
  File "/home/user/programming/paae/benchkit/benchkit/communication/__init__.py", line 338, in copy_to_host
    raise NotImplementedError("Copy to host is not implemented for this communication layer")
NotImplementedError: Copy to host is not implemented for this communication layer

A temporary fix for this is to change the file at benchkit/communication/docker.py as seen in the following diff.

diff --git a/benchkit/communication/docker.py b/benchkit/communication/docker.py
index 410bc4e..47611f2 100644
--- a/benchkit/communication/docker.py
+++ b/benchkit/communication/docker.py
@@ -28,7 +28,7 @@ class DockerCommLayer(CommunicationLayer):
 
     @property
     def is_local(self) -> bool:
-        return False
+        return True
 
     def _get_command_prefix(self) -> SplitCommand:
         if self._command_prefix is None:

The causes for this problem appear to be #25 and #26.

@apaolillo apaolillo self-assigned this Sep 1, 2024
@apaolillo apaolillo added bug Something isn't working enhancement New feature or request planned labels Sep 1, 2024
@apaolillo
Copy link
Collaborator

Indeed, this will have to be done using the docker utilities like docker cp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request planned
Projects
None yet
Development

No branches or pull requests

2 participants