99 lines
4.2 KiB
YAML
99 lines
4.2 KiB
YAML
|
|
services:
|
|
|
|
# first the management
|
|
|
|
management:
|
|
# select the correct one base on platform this is running on
|
|
image: git.chai.uni-hamburg.de/ums-agenten/management:arm64
|
|
#image: git.chai.uni-hamburg.de/ums-agenten/management:amd64
|
|
ports:
|
|
# external (to host) http port
|
|
# open: http://localhost:8080/ !
|
|
- 8080:80
|
|
environment:
|
|
# limit number of trials for solving a riddle
|
|
- SOLUTION_MAX_TRIALS=5
|
|
# limit to prevent messages in never ending cycles
|
|
- MESSAGE_MAX_CONTACTS=100
|
|
# how to access management (the host name is the name of the service in this file)
|
|
- MANAGEMENT_URL=http://management
|
|
# *register* the agents to the management
|
|
- AGENTS_PROCESS=http://agent_extract:8000
|
|
- AGENTS_SOLVE=http://agent_solve:8000
|
|
- AGENTS_GATEKEEPER=http://agent_gatekeeper:8000
|
|
# divide multiple agents of same type by comma
|
|
#- AGENTS_PROCESS=http://agent_extract_1:8000,http://agent_extract_2:8000
|
|
volumes:
|
|
# all data is bind-mounted from ./data on the host into the containers
|
|
# the folder *share* is shared with all agents, it can be used to pass the data via files
|
|
- ./data/share/:/ums-agenten/share/
|
|
# the folder *persist* is different for each container and is used to store data permanently
|
|
- ./data/persist-management/:/ums-agenten/persist/
|
|
|
|
# afterwards the agents
|
|
|
|
agent_extract:
|
|
# this allow to do installs etc. in the docker image (a new image will be built on top of the provided one)
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
# select the correct one base on platform this is running on
|
|
- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
|
|
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-amd64
|
|
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:gpu-amd64
|
|
ports:
|
|
# this port is only for access from the host, the management can always use 8000
|
|
- 8081:8000
|
|
environment:
|
|
# python package:variable_name of the list of agents implemeted here
|
|
- AGENTS_LIST=src.extract.agent:AGENT_CLASSES
|
|
# tell the agent where the management is accessible
|
|
- MANAGEMENT_URL=http://management
|
|
volumes:
|
|
- ./data/share/:/ums-agenten/share/
|
|
- ./data/persist-extract/:/ums-agenten/persist/
|
|
# this is for development (s.t. the changes in ./src/ are directly applied)
|
|
- ./src/:/ums-agenten/project/src/:ro
|
|
# for development: will detect file changes and reload server with new source
|
|
entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
|
|
|
agent_solve:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
|
|
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-amd64
|
|
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:gpu-amd64
|
|
ports:
|
|
- 8082:8000
|
|
environment:
|
|
- AGENTS_LIST=src.solve.agent:AGENT_CLASSES
|
|
- MANAGEMENT_URL=http://management
|
|
volumes:
|
|
- ./data/share/:/ums-agenten/share/
|
|
- ./data/persist-solve/:/ums-agenten/persist/
|
|
- ./src/:/ums-agenten/project/src/:ro
|
|
entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
|
|
|
agent_gatekeeper:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
|
|
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-amd64
|
|
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:gpu-amd64
|
|
ports:
|
|
- 8083:8000
|
|
environment:
|
|
- AGENTS_LIST=src.validate.agent:AGENT_CLASSES
|
|
- MANAGEMENT_URL=http://management
|
|
volumes:
|
|
- ./data/share/:/ums-agenten/share/
|
|
- ./data/persist-validate/:/ums-agenten/persist/
|
|
- ./src/:/ums-agenten/project/src/:ro
|
|
entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
|
|