File tree Expand file tree Collapse file tree 5 files changed +83
-4
lines changed
Expand file tree Collapse file tree 5 files changed +83
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches : [ master, main ]
6+ workflow_dispatch : # Allow manual triggering
7+
8+ jobs :
9+ build-and-push :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Docker Buildx
17+ uses : docker/setup-buildx-action@v2
18+
19+ - name : Login to DockerHub
20+ uses : docker/login-action@v2
21+ with :
22+ username : ${{ secrets.DOCKERHUB_USERNAME }}
23+ password : ${{ secrets.DOCKERHUB_TOKEN }}
24+
25+ - name : Extract metadata for Docker
26+ id : meta
27+ uses : docker/metadata-action@v4
28+ with :
29+ images : minimalfuture/agentmesh
30+ tags : |
31+ type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
32+ type=sha,format=short
33+
34+ - name : Build and push Docker image
35+ uses : docker/build-push-action@v4
36+ with :
37+ context : .
38+ push : true
39+ tags : ${{ steps.meta.outputs.tags }}
40+ labels : ${{ steps.meta.outputs.labels }}
41+ cache-from : type=gha
42+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1+ FROM python:3.11-slim
2+
3+ WORKDIR /app
4+
5+ # Copy project files
6+ COPY . /app/
7+
8+ # Install dependencies
9+ RUN pip install --no-cache-dir -e .
10+
11+ # Create configuration directory
12+ RUN mkdir -p /config
13+
14+ # Set environment variable pointing to config file
15+ ENV CONFIG_PATH=/config/config.yaml
16+
17+ # Set entrypoint
18+ ENTRYPOINT ["python" , "-m" , "agentmesh" ]
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Install core dependencies:
3434pip install -r requirements.txt
3535```
3636
37- For browser tools, install additional dependencies (optional, python3.11+ required):
37+ For browser tools, install additional dependencies (python3.11+ required):
3838
3939``` bash
4040pip install browser-use
Original file line number Diff line number Diff line change 66
77def load_config ():
88 global global_config
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
11- with open (config_path , 'r' ) as file :
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+
20+ with open (config_path , 'r' ) as file :
1221 # Load the YAML content into global_config
1322 global_config = yaml .safe_load (file )
1423
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+
3+ services :
4+ agentmesh :
5+ build : .
6+ image : agentmesh
7+ volumes :
8+ - ./config.yaml:/config/config.yaml
9+ stdin_open : true # Enable interactive input
10+ tty : true # Allocate a pseudo-TTY
You can’t perform that action at this time.
0 commit comments