Jump to content

Docker (software): Difference between revisions

Line 78: Line 78:
In this mode, docker processes have full access to your network. This can cause port conflicts if you are not careful.
In this mode, docker processes have full access to your network. This can cause port conflicts if you are not careful.
Furthermore, your docker service will have full access to your localhost. I do not recommend using this mode for most things.
Furthermore, your docker service will have full access to your localhost. I do not recommend using this mode for most things.
==GPUs==
See [https://docs.docker.com/config/containers/resource_constraints/#gpu docker guide]
===Setup===
# Go to [https://nvidia.github.io/nvidia-container-runtime/ nvidia-container-runtime] and add the repo
# Install <code>nvidia-container-runtime</code>
===Run===
Add <code>--gpus all</code> to your docker run command.
===compose===
See [https://github.com/docker/compose/issues/6691 issue].
<pre>
  deploy:
      resources:
        reservations:
          devices:
            - capabilities:
              - gpu
</pre>


==Windows==
==Windows==