File tree Expand file tree Collapse file tree 4 files changed +53
-15
lines changed
Expand file tree Collapse file tree 4 files changed +53
-15
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ WORKDIR /app
55# Copy project files
66COPY . /app/
77
8+ # Make entrypoint script executable
9+ RUN chmod +x entrypoint.sh
10+
811# Install dependencies
912RUN pip install --no-cache-dir -e .
1013
@@ -15,4 +18,4 @@ RUN mkdir -p /config
1518ENV CONFIG_PATH=/config/config.yaml
1619
1720# Set entrypoint
18- ENTRYPOINT ["python" , "-m" , "agentmesh " ]
21+ CMD ["/app/entrypoint.sh " ]
Original file line number Diff line number Diff line change 66
77def load_config ():
88 global global_config
9- # Get config path from environment variable or use default path
10- config_path = os .environ .get ("CONFIG_PATH" )
11-
12- if not config_path :
13- # Default path as fallback
14- config_path = os .path .abspath (os .path .join (os .path .dirname (__file__ ), '../../../config.yaml' ))
15-
16- # Check if config file exists
17- if not os .path .exists (config_path ):
18- raise FileNotFoundError (f"Config file not found at { config_path } " )
19-
9+ # Get the absolute path to the config.yaml file
10+ config_path = os .path .abspath (os .path .join (os .path .dirname (__file__ ), '../../../config.yaml' )) # Adjust the path
2011 with open (config_path , 'r' ) as file :
2112 # Load the YAML content into global_config
2213 global_config = yaml .safe_load (file )
Original file line number Diff line number Diff line change 1- version : ' 3 '
1+ version : ' 2.0 '
22
33services :
44 agentmesh :
5- build : .
6- image : agentmesh
5+ image : minimalfuture/agentmesh
6+ container_name : agentmesh
77 volumes :
88 - ./config.yaml:/config/config.yaml
99 stdin_open : true # Enable interactive input
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ echo " Welcome to AgentMesh!"
4+ echo " Available commands:"
5+ echo " list - List available teams (python main.py -l)"
6+ echo " run - Run a specific team (python main.py -t TEAM_NAME)"
7+ echo " help - Show this help message"
8+ echo " exit - Exit the container"
9+ echo " "
10+
11+ while true ; do
12+ read -p " agentmesh> " cmd args
13+
14+ case " $cmd " in
15+ list)
16+ python main.py -l
17+ ;;
18+ run)
19+ if [ -z " $args " ]; then
20+ echo " Error: Please specify a team name"
21+ echo " Usage: run TEAM_NAME"
22+ else
23+ python main.py -t $args
24+ fi
25+ ;;
26+ help)
27+ echo " Available commands:"
28+ echo " list - List available teams"
29+ echo " run - Run a specific team (run TEAM_NAME)"
30+ echo " help - Show this help message"
31+ echo " exit - Exit the container"
32+ ;;
33+ exit)
34+ echo " Goodbye!"
35+ exit 0
36+ ;;
37+ * )
38+ if [ -n " $cmd " ]; then
39+ echo " Unknown command: $cmd "
40+ echo " Type 'help' for available commands"
41+ fi
42+ ;;
43+ esac
44+ done
You can’t perform that action at this time.
0 commit comments