mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 50599: Passed allocated GPUs to 'devices' entry of 'docker::Flags'.
Date Thu, 25 Aug 2016 18:01:03 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50599/#review146816
-----------------------------------------------------------




src/slave/containerizer/docker.hpp (line 509)
<https://reviews.apache.org/r/50599/#comment213522>

    I don't think this should just be a string. It should be an actual vector of type `Device`.
    
    Also, the comment should read:
    ```
    // Devices attached to the container.
    ```



src/slave/containerizer/docker.cpp (lines 685 - 719)
<https://reviews.apache.org/r/50599/#comment213526>

    If you store `devices` as a vector of type `Device`, and you use the suggestion from the
previous patch to add a static `parse()` function to `Device`, this whole code block becomes:
    
    ```
    container->devices.push_back(
        Device::parse("/dev/nvidiactl:/dev/nvidiactl:rwm"));
        
    container->devices.push_back(
        Device::parse("/dev/nvidia-uvm:/dev/nvidia-uvm:rwm"));
        
    if (os::exists("/dev/nvidia-uvm-tools")) {
      container->devices.push_back(
          Device::parse("/dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools:rwm"));
    }
    ```
    
    The join as a single comma-separated string should happen only when you are ready to add
it to the flags.



src/slave/containerizer/docker.cpp (lines 685 - 686)
<https://reviews.apache.org/r/50599/#comment213528>

    You also need to include `/dev/nvidia-uvm-tools` if it exists.


- Kevin Klues


On Aug. 22, 2016, 10:12 a.m., Yubo Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50599/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2016, 10:12 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Guangya Liu, Kevin Klues, and Rajat Phull.
> 
> 
> Bugs: MESOS-5795
>     https://issues.apache.org/jira/browse/MESOS-5795
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a new string entry 'devices' to 'docker::Flags' to
> indicate host devices exposed into docker container, and
> passed allocated GPUs to it.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/docker.hpp f2a06065cf99fed934c2c1ffc47461ec8a97f50d 
>   src/slave/containerizer/docker.cpp 5c1ee8e467d1c54c60b67dc5275ef71e1bb90723 
> 
> Diff: https://reviews.apache.org/r/50599/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Yubo Li
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message