Kuk1 commited on
Commit
2bb2438
Β·
1 Parent(s): 3f50b76

Switch to Docker SDK for build stability

Browse files
Files changed (3) hide show
  1. Dockerfile +26 -0
  2. README.md +5 -8
  3. app.py +7 -2
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies if needed (e.g. for audio)
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ COPY . .
14
+
15
+ # Expose Gradio port
16
+ EXPOSE 7860
17
+
18
+ # Environment variables
19
+ ENV PYTHONUNBUFFERED=1
20
+ ENV PYTHONPATH=/app
21
+ ENV GRADIO_SERVER_NAME=0.0.0.0
22
+ ENV GRADIO_SERVER_PORT=7860
23
+
24
+ # Run the app
25
+ CMD ["python", "app.py"]
26
+
README.md CHANGED
@@ -2,10 +2,8 @@
2
  title: Echo - Universal MCP Host
3
  emoji: πŸ”Š
4
  colorFrom: gray
5
- colorTo: gray
6
- sdk: gradio
7
- sdk_version: 5.0.0
8
- app_file: app.py
9
  pinned: false
10
  tags:
11
  - mcp-in-action-track-consumer
@@ -49,10 +47,10 @@ Echo is server-agnostic.
49
 
50
  1. **Enter your OpenAI API Key** in the settings (or via Environment Variable).
51
  2. **Go to TOOLS**: See available servers.
52
- 3. **Click Connect** on "agentbell-voice" or "memory".
53
  4. **Go to SESSION**: Chat with the agent.
54
- * Try: "Create a memory entity called Test" (Tool Call)
55
- * Try: "Delete all entities" (Triggers Blocking State -> Inspector Highlight)
56
  5. **Open INSPECTOR**: Watch the JSON-RPC traffic live.
57
 
58
  ---
@@ -65,4 +63,3 @@ cd echo-agent
65
  pip install -r requirements.txt
66
  python app.py
67
  ```
68
-
 
2
  title: Echo - Universal MCP Host
3
  emoji: πŸ”Š
4
  colorFrom: gray
5
+ colorTo: black
6
+ sdk: docker
 
 
7
  pinned: false
8
  tags:
9
  - mcp-in-action-track-consumer
 
47
 
48
  1. **Enter your OpenAI API Key** in the settings (or via Environment Variable).
49
  2. **Go to TOOLS**: See available servers.
50
+ 3. **Click Connect** on "agentbell-voice".
51
  4. **Go to SESSION**: Chat with the agent.
52
+ * Try: "Help me"
53
+ * Try: "Delete file test.txt" (Triggers Blocking State -> Inspector Highlight)
54
  5. **Open INSPECTOR**: Watch the JSON-RPC traffic live.
55
 
56
  ---
 
63
  pip install -r requirements.txt
64
  python app.py
65
  ```
 
app.py CHANGED
@@ -12,6 +12,11 @@ from ui.layout import create_ui
12
 
13
  if __name__ == "__main__":
14
  # Launch the application
15
- # server_name="0.0.0.0" allows external access if needed
16
  ui = create_ui()
17
- ui.launch(server_port=7860)
 
 
 
 
 
 
 
12
 
13
  if __name__ == "__main__":
14
  # Launch the application
 
15
  ui = create_ui()
16
+
17
+ # Use environment variables for configuration, with safe defaults
18
+ # 0.0.0.0 is required for Docker/Hugging Face Spaces
19
+ server_name = os.getenv("GRADIO_SERVER_NAME", "0.0.0.0")
20
+ server_port = int(os.getenv("GRADIO_SERVER_PORT", "7860"))
21
+
22
+ ui.launch(server_name=server_name, server_port=server_port)