docker-compose.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # docker swarm init, then you have to do // note version_mpinet is the name of the overlay
  2. # docker network create --driver=overlay --attachable yml_mpinet
  3. # Jan, 17, 2025 - Jean-Michel Batto
  4. services:
  5. mysql:
  6. image: mariadb:10.10
  7. hostname: mysql
  8. container_name: mysql
  9. environment:
  10. MARIADB_ROOT_PASSWORD: password
  11. MARIADB_DATABASE: slurm_acct_db
  12. MARIADB_USER: slurm
  13. MARIADB_PASSWORD: password
  14. volumes:
  15. - var_lib_mysql:/var/lib/mysql
  16. ports:
  17. - "3306:3306"
  18. networks:
  19. - mpinet
  20. slurmdbd:
  21. image: jmbatto/m2chps-slurm-cluster:latest
  22. command: ["slurmdbd"]
  23. container_name: slurmdbd
  24. hostname: slurmdbd
  25. volumes:
  26. - etc_munge:/etc/munge
  27. # - etc_slurm:/etc/slurm
  28. - var_log_slurm:/var/log/slurm
  29. expose:
  30. - "6819"
  31. depends_on:
  32. - mysql
  33. shm_size: '512m'
  34. networks:
  35. - mpinet
  36. slurmctld:
  37. image: jmbatto/m2chps-slurm-cluster:latest
  38. command: ["slurmctld"]
  39. container_name: slurmctld
  40. hostname: slurmctld
  41. volumes:
  42. - etc_munge:/etc/munge
  43. # - etc_slurm:/etc/slurm
  44. - slurm_jobdir:/data
  45. - var_log_slurm:/var/log/slurm
  46. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  47. expose:
  48. - "6817"
  49. depends_on:
  50. - "slurmdbd"
  51. shm_size: '512m'
  52. networks:
  53. - mpinet
  54. c1:
  55. image: jmbatto/m2chps-slurm-cluster:latest
  56. command: ["slurmd"]
  57. hostname: c1
  58. container_name: c1
  59. volumes:
  60. - etc_munge:/etc/munge
  61. # - etc_slurm:/etc/slurm
  62. - slurm_jobdir:/data
  63. - var_log_slurm:/var/log/slurm
  64. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  65. expose:
  66. - "6818"
  67. depends_on:
  68. - "slurmctld"
  69. shm_size: '512m'
  70. networks:
  71. - mpinet
  72. c2:
  73. image: jmbatto/m2chps-slurm-cluster:latest
  74. command: ["slurmd"]
  75. hostname: c2
  76. container_name: c2
  77. volumes:
  78. - etc_munge:/etc/munge
  79. # - etc_slurm:/etc/slurm
  80. - slurm_jobdir:/data
  81. - var_log_slurm:/var/log/slurm
  82. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  83. expose:
  84. - "6818"
  85. depends_on:
  86. - "slurmctld"
  87. shm_size: '512m'
  88. networks:
  89. - mpinet
  90. networks:
  91. mpinet:
  92. external: true
  93. name : yml_mpinet
  94. driver: overlay
  95. volumes:
  96. etc_munge:
  97. # etc_slurm:
  98. slurm_jobdir:
  99. var_lib_mysql:
  100. var_log_slurm:
  101. usrlocalvarmpi-foo: