Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ Configure each swarm node's Docker daemon with GPU resources in `/etc/docker/dae

```json
{
"default-runtime": "amd",
"runtimes": {
"amd": {
"path": "amd-container-runtime",
Expand All @@ -283,14 +284,15 @@ sudo systemctl restart docker

Deploy services with specific GPU requirements using docker-compose:

**Using generic resources:**

```yaml
# docker-compose.yml for Swarm deployment
version: '3.8'
services:
rocm-service:
image: rocm/dev-ubuntu-24.04
command: rocm-smi
runtime: amd
deploy:
replicas: 1
resources:
Expand All @@ -301,6 +303,21 @@ services:
value: 1
```

**Using environment variables:**

```yaml
# docker-compose.yml for Swarm deployment with environment variable
version: '3.8'
services:
rocm-service:
image: rocm/dev-ubuntu-24.04
command: rocm-smi
environment:
- AMD_VISIBLE_DEVICES=all
deploy:
replicas: 1
```

Deploy the service:
```bash
docker stack deploy -c docker-compose.yml rocm-stack
Expand Down
19 changes: 18 additions & 1 deletion docs/container-runtime/docker-swarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Configure each swarm node's Docker daemon with GPU resources in `/etc/docker/dae

```json
{
"default-runtime": "amd",
"runtimes": {
"amd": {
"path": "amd-container-runtime",
Expand All @@ -32,14 +33,15 @@ sudo systemctl restart docker

Deploy services with specific GPU requirements using docker-compose:

**Using generic resources:**

```yaml
# docker-compose.yml for Swarm deployment
version: '3.8'
services:
rocm-service:
image: rocm/dev-ubuntu-24.04
command: rocm-smi
runtime: amd
deploy:
replicas: 1
resources:
Expand All @@ -50,6 +52,21 @@ services:
value: 1
```

**Using environment variables:**

```yaml
# docker-compose.yml for Swarm deployment with environment variable
version: '3.8'
services:
rocm-service:
image: rocm/dev-ubuntu-24.04
command: rocm-smi
environment:
- AMD_VISIBLE_DEVICES=all
deploy:
replicas: 1
```

Deploy the service:
```bash
docker stack deploy -c docker-compose.yml rocm-stack
Expand Down
Loading