Add agent (and small dummy)
This commit is contained in:
@ -6,35 +6,72 @@ services:
|
||||
#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
|
||||
# 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_process_1:3001,http://agent_process_2:3001
|
||||
- AGENTS_SOLVE=http://agent_solve_1:3001
|
||||
- AGENTS_GATEKEEPER=http://agent_gatekeeper_1:3001
|
||||
- AGENTS_PROCESS=http://agent_extract_1:8000,http://agent_extract_2:8000
|
||||
- AGENTS_SOLVE=http://agent_solve:8000
|
||||
- AGENTS_GATEKEEPER=http://agent_gatekeeper: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 large data via files
|
||||
# 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 can be used to store data permanently
|
||||
# the folder *persist* is different for each container and is used to store data permanently
|
||||
- ./data/persist-management/:/ums-agenten/persist/
|
||||
|
||||
agent_process_1:
|
||||
agent_solve:
|
||||
# this allow to do installs etc. in the docker image (a new image will be built on top of the provided one)
|
||||
build:
|
||||
context: .
|
||||
context: ./agent-solve
|
||||
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.agent:AGENT_CLASSES
|
||||
# tell the agent where the management is accessible
|
||||
- MANAGEMENT=http://management
|
||||
- MANAGEMENT_URL=http://management
|
||||
volumes:
|
||||
- ./data/share/:/ums-agenten/share/
|
||||
- ./data/persist-process-1/:/ums-agenten/persist/
|
||||
- ./data/persist-solve/:/ums-agenten/persist/
|
||||
# this is for development (s.t. the changes in ./src/ are directly applied)
|
||||
- ./src/:/ums-agenten/project/src/:ro
|
||||
entrypoint: ... # TODO
|
||||
- ./agent-solve/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/"
|
||||
networks:
|
||||
# this is a trick: we add multiple host names to the same container
|
||||
# later, each agent will get its own container, but for testing, by this
|
||||
# one container can become *all* agents
|
||||
default:
|
||||
aliases:
|
||||
- agent_extract_2
|
||||
- agent_gatekeeper
|
||||
|
||||
agent_extract_1:
|
||||
build:
|
||||
context: ./agent-extract
|
||||
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.agent:AGENT_CLASSES
|
||||
- MANAGEMENT_URL=http://management
|
||||
volumes:
|
||||
- ./data/share/:/ums-agenten/share/
|
||||
- ./data/persist-extract/:/ums-agenten/persist/
|
||||
- ./agent-extract/src/:/ums-agenten/project/src/:ro
|
Reference in New Issue
Block a user