You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/manuals/desktop/features/gpu.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: GPU support in Docker Desktop
2
+
title: GPU support in Docker Desktop for Windows
3
3
linkTitle: GPU support
4
-
weight: 80
4
+
weight: 40
5
5
description: How to use GPU in Docker Desktop
6
6
keywords: gpu, gpu support, nvidia, wsl2, docker desktop, windows
7
7
toc_max: 3
@@ -13,22 +13,27 @@ aliases:
13
13
>
14
14
> Currently GPU support in Docker Desktop is only available on Windows with the WSL2 backend.
15
15
16
-
## Using NVIDIA GPUs with WSL2
16
+
Docker Desktop for Windows supports NVIDIA GPU Paravirtualization (GPU-PV) on NVIDIA GPUs, allowing containers to access GPU resources for compute-intensive workloads like AI, machine learning, or video processing.
17
17
18
-
Docker Desktop for Windows supports WSL 2 GPU Paravirtualization (GPU-PV) on NVIDIA GPUs. To enable WSL 2 GPU Paravirtualization, you need:
18
+
## Prerequisites
19
19
20
-
- A machine with an NVIDIA GPU
20
+
To enable WSL 2 GPU Paravirtualization, you need:
21
+
22
+
- A Windows machine with an NVIDIA GPU
21
23
- Up to date Windows 10 or Windows 11 installation
22
24
-[Up to date drivers](https://developer.nvidia.com/cuda/wsl) from NVIDIA supporting WSL 2 GPU Paravirtualization
23
25
- The latest version of the WSL 2 Linux kernel. Use `wsl --update` on the command line
24
26
- To make sure the [WSL 2 backend is turned on](wsl/_index.md#turn-on-docker-desktop-wsl-2) in Docker Desktop
25
27
26
-
To validate that everything works as expected, execute a `docker run` command with the `--gpus=all` flag. For example, the following will run a short benchmark on your GPU:
28
+
## Validate GPU support
29
+
30
+
To confirm GPU access is working inside Docker, run the following:
27
31
28
32
```console
29
33
$ docker run --rm -it --gpus=all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
30
34
```
31
-
The output will be similar to:
35
+
36
+
This runs an n-body simulation benchmark on the GPU. The output will be similar to:
32
37
33
38
```console
34
39
Run "nbody -benchmark [-numbodies=<numBodies>]" to measure performance.
@@ -58,9 +63,16 @@ GPU Device 0: "GeForce RTX 2060 with Max-Q Design" with compute capability 7.5
58
63
= 2724.379 single-precision GFLOP/s at 20 flops per interaction
59
64
```
60
65
61
-
Or if you wanted to try something more useful you could use the official [Ollama image](https://hub.docker.com/r/ollama/ollama) to run the Llama2 large language model.
66
+
## Run a real-world model: Llama2 with Ollama
67
+
68
+
Use the [official Ollama image](https://hub.docker.com/r/ollama/ollama) to run the Llama2 LLM with GPU acceleration:
Copy file name to clipboardExpand all lines: content/manuals/desktop/features/networking.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
description: Understand how networking works on Docker Desktop and see the known limitations
3
3
keywords: networking, docker desktop, proxy, vpn, Linux, Mac, Windows
4
4
title: Explore networking features on Docker Desktop
5
+
linkTitle: Networking
5
6
aliases:
6
7
- /desktop/linux/networking/
7
8
- /docker-for-mac/networking/
@@ -11,11 +12,10 @@ aliases:
11
12
- /docker-for-windows/networking/
12
13
- /desktop/windows/networking/
13
14
- /desktop/networking/
14
-
weight: 50
15
+
weight: 30
15
16
---
16
17
17
-
Docker Desktop provides several networking features to make it easier to
18
-
use.
18
+
Docker Desktop includes built-in networking capabilities to help you connect containers with services on your host, across containers, or through proxies and VPNs.
19
19
20
20
## Networking features for all platforms
21
21
@@ -33,17 +33,21 @@ When you run a container with the `-p` argument, for example:
33
33
$ docker run -p 80:80 -d nginx
34
34
```
35
35
36
-
Docker Desktop makes whatever is running on port 80 in the container, in
37
-
this case, `nginx`, available on port 80 of `localhost`. In this example, the
38
-
host and container ports are the same. If, for example, you already have something running on port 80 of
39
-
your host machine, you can connect the container to a different port:
36
+
Docker Desktop makes whatever is running on port `80` in the container, in
37
+
this case, `nginx`, available on port `80` of `localhost`. In this example, the
38
+
host and container ports are the same.
39
+
40
+
To avoid conflicts with services already using port `80` on the host:
40
41
41
42
```console
42
43
$ docker run -p 8000:80 -d nginx
43
44
```
44
45
45
-
Now, connections to `localhost:8000` are sent to port 80 in the container. The
46
-
syntax for `-p` is `HOST_PORT:CLIENT_PORT`.
46
+
Now connections to `localhost:8000` are sent to port `80` in the container.
47
+
48
+
> [!TIP]
49
+
>
50
+
> The syntax for `-p` is `HOST_PORT:CLIENT_PORT`.
47
51
48
52
### HTTP/HTTPS Proxy support
49
53
@@ -53,10 +57,6 @@ See [Proxies](/manuals/desktop/settings-and-maintenance/settings.md#proxies)
SOCKS (Socket Secure) is a protocol that facilitates the routing of network packets between a client and a server through a proxy server. It provides a way to enhance privacy, security, and network performance for users and applications.
61
61
62
62
You can enable SOCKS proxy support to allow outgoing requests, such as pulling images, and access Linux container backend IPs from the host.
@@ -72,7 +72,7 @@ To enable and set up SOCKS proxy support:
72
72
73
73
### SSH agent forwarding
74
74
75
-
Docker Desktop on Mac and Linux allows you to use the host’s SSH agent inside a container. To do this:
75
+
Docker Desktop for Mac and Linux lets you use the host’s SSH agent inside a container. To do this:
76
76
77
77
1. Bind mount the SSH agent socket by adding the following parameter to your `docker run` command:
78
78
@@ -104,9 +104,9 @@ services:
104
104
105
105
### Changing internal IP addresses
106
106
107
-
The internal IP addresses used by Docker can be changed from **Settings**. After changing IPs, it is necessary to reset the Kubernetes cluster and to leave any active Swarm.
107
+
The internal IP addresses used by Docker can be changed from **Settings**. After changing IPs, you need to reset the Kubernetes cluster and to leave any active Swarm.
108
108
109
-
### There is no docker0 bridge on the host
109
+
### There is no `docker0` bridge on the host
110
110
111
111
Because of the way networking is implemented in Docker Desktop, you cannot
112
112
see a `docker0` interface on the host. This interface is actually within the
@@ -127,7 +127,7 @@ However if you are a Windows user, per-container IP addressing is possible with
127
127
### I want to connect from a container to a service on the host
128
128
129
129
The host has a changing IP address, or none if you have no network access.
130
-
We recommend that you connect to the special DNS name `host.docker.internal`,
130
+
Docker recommends you connect to the special DNS name `host.docker.internal`,
131
131
which resolves to the internal IP address used by the host.
132
132
133
133
You can also reach the gateway using `gateway.docker.internal`.
@@ -154,7 +154,7 @@ If you have installed Python on your machine, use the following instructions as
154
154
Port forwarding works for `localhost`. `--publish`, `-p`, or `-P` all work.
155
155
Ports exposed from Linux are forwarded to the host.
156
156
157
-
We recommend you publish a port, or to connect from another
157
+
Docker recommends you publish a port, or to connect from another
158
158
container. This is what you need to do even on Linux if the container is on an
159
159
overlay network, not a bridge network, as these are not routed.
Copy file name to clipboardExpand all lines: content/manuals/desktop/features/usbip.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Using USB/IP with Docker Desktop
3
3
linkTitle: USB/IP support
4
-
weight: 100
4
+
weight: 80
5
5
description: How to use USB/IP in Docker Desktop
6
6
keywords: usb, usbip, docker desktop, macos, windows, linux
7
7
toc_max: 3
@@ -11,15 +11,11 @@ aliases:
11
11
12
12
{{< summary-bar feature_name="USB/IP support" >}}
13
13
14
-
> [!NOTE]
15
-
>
16
-
> Available on Docker Desktop for Mac, Linux, and Windows with the Hyper-V backend.
17
-
18
14
USB/IP enables you to share USB devices over the network, which can then be accessed from within Docker containers. This page focuses on sharing USB devices connected to the machine you run Docker Desktop on. You can repeat the following process to attach and use additional USB devices as needed.
19
15
20
16
> [!NOTE]
21
17
>
22
-
> The Docker Desktop VM kernel image comes pre-configured with drivers for many common USB devices, but Docker can't guarantee every possible USB device will work with this setup.
18
+
> Docker Desktop includes built-in drivers for many common USB devices but Docker can't guarantee every possible USB device works with this setup.
23
19
24
20
## Setup and use
25
21
@@ -48,6 +44,8 @@ To attach the USB device, start a privileged Docker container with the PID names
48
44
$ docker run --rm -it --privileged --pid=host alpine
49
45
```
50
46
47
+
`--privileged` gives the container full access to the host, and `--pid=host` allows it to share the host’s process namespace.
48
+
51
49
### Step three: Enter the mount namespace of PID 1
52
50
53
51
Inside the container, enter the mount namespace of the `init` process to gain access to the pre-installed USB/IP tools:
@@ -56,7 +54,7 @@ Inside the container, enter the mount namespace of the `init` process to gain ac
56
54
$ nsenter -t 1 -m
57
55
```
58
56
59
-
### Step four: Use USB/IP tools
57
+
### Step four: Use the USB/IP tools
60
58
61
59
Now you can use the USB/IP tools as you would on any other system:
62
60
@@ -102,7 +100,7 @@ Example output:
102
100
event0 mice
103
101
```
104
102
105
-
### Step five: Use the attached device in another container
103
+
### Step five: Access the device from another container
106
104
107
105
While the initial container remains running to keep the USB device operational, you can access the attached device from another container. For example:
Copy file name to clipboardExpand all lines: content/manuals/desktop/features/vmm.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,23 @@ title: Virtual Machine Manager for Docker Desktop on Mac
3
3
linkTitle: Virtual Machine Manager
4
4
keywords: virtualization software, resource allocation, mac, docker desktop, vm monitoring, vm performance, apple silicon
5
5
description: Discover Docker Desktop for Mac's Virtual Machine Manager (VMM) options, including the new Docker VMM for Apple Silicon, offering enhanced performance and efficiency
6
-
weight: 110
6
+
weight: 100
7
7
aliases:
8
8
- /desktop/vmm/
9
9
---
10
10
11
-
{{< summary-bar feature_name="VMM" >}}
11
+
Docker Desktop supports multiple Virtual Machine Managers (VMMs) to power the Linux VM that runs containers. You can choose the most suitable option based on your system architecture (Intel or Apple Silicon), performance needs, and feature requirements. This page provides an overview of the available options.
12
12
13
-
The Virtual Machine Manager (VMM) in Docker Desktop for Mac is responsible for creating and managing the virtual machine used to run containers. Depending on your system architecture and performance needs, you can choose from multiple VMM options in Docker Desktop's [settings](/manuals/desktop/settings-and-maintenance/settings.md#general). This page provides an overview of the available options.
13
+
To change the VMM, go to **Settings** > **General** > **Virtual Machine Manager**.
14
14
15
15
## Docker VMM
16
16
17
-
Docker VMM is a new, container-optimized hypervisor introduced in Docker Desktop 4.35 and available on Apple Silicon Macs only. Its enhanced speed and resource efficiency makes it an ideal choice for optimizing your workflow.
17
+
{{< summary-bar feature_name="VMM" >}}
18
18
19
-
Docker VMM brings exciting advancements specifically tailored for Apple Silicon machines. By optimizing both the Linux kernel and hypervisor layers, Docker VMM delivers significant performance enhancements across common developer tasks.
19
+
Docker VMM is a new, container-optimized hypervisor. By optimizing both the Linux kernel and hypervisor layers, Docker VMM delivers significant performance enhancements across common developer tasks.
20
20
21
21
Some key performance enhancements provided by Docker VMM include:
22
-
- Faster I/O operations: With a cold cache, iterating over a large shared filesystem with `find` is 2x faster than when the Apple Virtualization Framework is used.
22
+
- Faster I/O operations: With a cold cache, iterating over a large shared filesystem with `find` is 2x faster than when the Apple Virtualization framework is used.
23
23
- Improved caching: With a warm cache, performance can improve by as much as 25x, even surpassing native Mac operations.
24
24
25
25
These improvements directly impact developers who rely on frequent file access and overall system responsiveness during containerized development. Docker VMM marks a significant leap in speed, enabling smoother workflows and faster iteration cycles.
@@ -35,9 +35,9 @@ As Docker VMM is still in Beta, there are a few known limitations:
35
35
- Docker VMM does not currently support Rosetta, so emulation of amd64 architectures is slow. Docker is exploring potential solutions.
36
36
- Certain databases, like MongoDB and Cassandra, may fail when using virtiofs with Docker VMM. This issue is expected to be resolved in a future release.
37
37
38
-
## Apple Virtualization Framework
38
+
## Apple Virtualization framework
39
39
40
-
The Apple Virtualization Framework is a stable and well-established option for managing virtual machines on Mac. It has been a reliable choice for many Mac users over the years. This framework is best suited for developers who prefer a proven solution with solid performance and broad compatibility.
40
+
The Apple Virtualization framework is a stable and well-established option for managing virtual machines on Mac. It has been a reliable choice for many Mac users over the years. This framework is best suited for developers who prefer a proven solution with solid performance and broad compatibility.
41
41
42
42
## QEMU (Legacy) for Apple Silicon
43
43
@@ -47,7 +47,7 @@ The Apple Virtualization Framework is a stable and well-established option for m
47
47
48
48
QEMU is a legacy virtualization option for Apple Silicon Macs, primarily supported for older use cases.
49
49
50
-
Docker recommends transitioning to newer alternatives, such as Docker VMM or the Apple Virtualization Framework, as they offer superior performance and ongoing support. Docker VMM, in particular, offers substantial speed improvements and a more efficient development environment, making it a compelling choice for developers working with Apple Silicon.
50
+
Docker recommends transitioning to newer alternatives, such as Docker VMM or the Apple Virtualization framework, as they offer superior performance and ongoing support. Docker VMM, in particular, offers substantial speed improvements and a more efficient development environment, making it a compelling choice for developers working with Apple Silicon.
51
51
52
52
Note that this is not related to using QEMU to emulate non-native architectures in [multi-platform builds](/manuals/build/building/multi-platform.md#qemu).
0 commit comments