JUNOHUB-test/docker-compose.yml
2025-09-11 12:20:58 +05:00

61 lines
1.3 KiB
YAML

services:
master:
build: .
container_name: pdc-master
volumes:
- ./hostfile:/app/hostfile
environment:
- FRIENDLY_NAME=pdc-master
# This line automatically reads from the .env file
command: >
sh -c "/usr/sbin/sshd & sleep 5 && mpirun -np 5 --hostfile /app/hostfile --allow-run-as-root /app/${TASK_TO_RUN:-task1}"
networks:
- pdcn
worker1:
build: .
container_name: pdc-worker1
# REMOVED the 'hostname:' line
# ADDED the 'environment:' block
environment:
- FRIENDLY_NAME=pdc-worker1
command: /usr/sbin/sshd -D
networks:
- pdcn
worker2:
build: .
container_name: pdc-worker2
# REMOVED the 'hostname:' line
# ADDED the 'environment:' block
environment:
- FRIENDLY_NAME=pdc-worker2
command: /usr/sbin/sshd -D
networks:
- pdcn
worker3:
build: .
container_name: pdc-worker3
# REMOVED the 'hostname:' line
# ADDED the 'environment:' block
environment:
- FRIENDLY_NAME=pdc-worker3
command: /usr/sbin/sshd -D
networks:
- pdcn
worker4:
build: .
container_name: pdc-worker4
# REMOVED the 'hostname:' line
# ADDED the 'environment:' block
environment:
- FRIENDLY_NAME=pdc-worker4
command: /usr/sbin/sshd -D
networks:
- pdcn
networks:
pdcn:
driver: bridge