docker-compose.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. version: "3"
  2. services:
  3. etcd0:
  4. image: quay.io/coreos/etcd:v3.4.0
  5. container_name: etcd
  6. ports:
  7. - 23790:2379
  8. - 23800:2380
  9. volumes:
  10. - etcd0:/etcd-data
  11. environment:
  12. - ETCD0=localhost
  13. command:
  14. - /usr/local/bin/etcd
  15. - -name
  16. - etcd0
  17. - --data-dir
  18. - /etcd_data
  19. - -advertise-client-urls
  20. - http://etcd0:2379
  21. - -listen-client-urls
  22. - http://0.0.0.0:2379
  23. - -initial-advertise-peer-urls
  24. - http://etcd0:2380
  25. - -listen-peer-urls
  26. - http://0.0.0.0:2380
  27. - -initial-cluster
  28. - etcd0=http://etcd0:2380
  29. networks:
  30. - easyfl
  31. docker-register:
  32. image: wingalong/docker-register
  33. container_name: docker-regiser
  34. volumes:
  35. - /var/run/docker.sock:/var/run/docker.sock
  36. environment:
  37. - HOST_IP=172.25.0.1
  38. - ETCD_HOST=etcd0:2379
  39. networks:
  40. - easyfl
  41. depends_on:
  42. - etcd0
  43. tracker:
  44. image: easyfl-tracker
  45. container_name: easyfl-tracker
  46. ports:
  47. - "12666:12666"
  48. volumes:
  49. - /home/zwm/easyfl/tracker:/app/tracker
  50. networks:
  51. - easyfl
  52. environment:
  53. - PYTHONUNBUFFERED=1
  54. client:
  55. image: easyfl-client
  56. ports:
  57. - "23400-23500:23400"
  58. volumes:
  59. - /home/zwm/easyfl/easyfl/datasets/femnist/data:/app/easyfl/datasets/femnist/data
  60. command: ["--is-remote", "True", "--local-port", "23400", "--server-addr", "easyfl-server:23501", "--tracker-addr", "easyfl-tracker:12666"]
  61. networks:
  62. - easyfl
  63. environment:
  64. - PYTHONUNBUFFERED=1
  65. depends_on:
  66. - tracker
  67. # - etcd0
  68. # - docker-register
  69. server:
  70. image: easyfl-server
  71. container_name: easyfl-server
  72. ports:
  73. - "23501:23501"
  74. command: ["--is-remote", "True", "--local-port", "23501", "--tracker-addr", "easyfl-tracker:12666"]
  75. networks:
  76. - easyfl
  77. environment:
  78. - PYTHONUNBUFFERED=1
  79. depends_on:
  80. - tracker
  81. # - etcd0
  82. # - docker-register
  83. # trigger_run:
  84. # image: easyfl-run
  85. # command:
  86. # - --server-addr
  87. # - 172.21.0.1:23501
  88. # - --etcd-addr
  89. # - 172.21.0.1:2379
  90. # networks:
  91. # - easyfl
  92. # depends_on:
  93. # - client
  94. # - server
  95. volumes:
  96. etcd0:
  97. networks:
  98. easyfl: