Docker conf
This commit is contained in:
parent
77e9adfb79
commit
990ca271ca
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
ARG IMAGE_FROM
|
||||
FROM $IMAGE_FROM
|
||||
|
||||
# become root
|
||||
USER root
|
||||
|
||||
# do somthing as root, e.g. install packages, set up things ...
|
||||
# RUN ...
|
||||
|
||||
# copy the source of the agent in this repo
|
||||
COPY --chown=user:user ./src/ /ums-agenten/project/src/
|
||||
# fix permissions
|
||||
RUN chown -R user:user /ums-agenten
|
||||
# switch back to user
|
||||
USER user
|
40
docker-compose.yml
Normal file
40
docker-compose.yml
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
services:
|
||||
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
|
||||
- 8080:80
|
||||
environment:
|
||||
# *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
|
||||
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
|
||||
- /data/share/:/ums-agent/share/
|
||||
# the folder *persist* is different for each container and can be used to store data permanently
|
||||
- /data/persist-management/:/ums-agenten/persist/
|
||||
|
||||
agent_process_1:
|
||||
# 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
|
||||
environment:
|
||||
# tell the agent where the management is accessible
|
||||
- MANAGEMENT=http://management
|
||||
volumes:
|
||||
- /data/share/:/ums-agent/share/
|
||||
- /data/persist-process-1/:/ums-agenten/persist/
|
||||
# this is for development (s.t. the changes in ./src/ are directly applied)
|
||||
- ./src/:/ums-agenten/project/src/:ro
|
||||
entrypoint: ... # TODO
|
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
Loading…
x
Reference in New Issue
Block a user