AlessioM opened a new pull request #13541:
URL: https://github.com/apache/airflow/pull/13541


   closes: #9492
   
   * this uses the device_requests parameter when creating the docker container 
to enable container to access host devices
   * feature was introduced in docker-py 
[here](https://github.com/docker/docker-py/pull/2471) and released in 
[4.3.0](https://docker-py.readthedocs.io/en/stable/change-log.html)
   * had to increase the docker-py version to >=4.3, breaking changes mentioned 
in Changelog of docker-py (above) should have no effect
   
   ## intended use
   ```
       with_gpu = DockerOperator(
           task_id='with_gpu',
           image='nvidia/cuda:11.0-base',
           device_requests=[
               docker.types.DeviceRequest(count=-1, capabilities=[['gpu']])
           ]            
       )
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to