Skip to content

Commit 325da94

Browse files
committed
ENGDOCS-2409
1 parent 0a1c2bc commit 325da94

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

content/reference/compose-file/services.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,29 @@ configuration, which means for Linux `/etc/hosts` get extra lines:
10051005
::1 myhostv6
10061006
```
10071007

1008+
### `gpus`
1009+
1010+
{{< summary-bar feature_name="Compose gpus" >}}
1011+
1012+
`gpus` specifies GPU devices to be allocated for container usage. This is equivalent to a [device request](deploy.md#devices) with
1013+
an implicit `gpu` capability.
1014+
1015+
```yaml
1016+
services:
1017+
model:
1018+
gpus:
1019+
- driver: 3dfx
1020+
count: 2
1021+
```
1022+
1023+
`gpus` also can ge set as string `all` to allocate all aviable GPU devices to container.
1024+
1025+
```yaml
1026+
services:
1027+
model:
1028+
gpus: all
1029+
```
1030+
10081031
### `group_add`
10091032

10101033
`group_add` specifies additional groups, by name or number, which the user inside the container must be a member of.

data/summary.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Compose file watch:
8181
requires: Docker Compose [2.22.0](/manuals/compose/releases/release-notes.md#2220) and later
8282
Compose format:
8383
requires: Docker Compose [2.30.0](/manuals/compose/releases/release-notes.md#2300) and later
84+
Compose gpus:
85+
requires: Docker Compose [2.30.0](/manuals/compose/releases/release-notes.md#2300) and later
8486
Compose include:
8587
requires: Docker Compose [2.20.3](/manuals/compose/releases/release-notes.md#2203) and later
8688
Compose label file:

0 commit comments

Comments
 (0)