vaha-m commited on
Commit
f9f19f4
·
1 Parent(s): 7896195

Update PortfolioMind with full documentation and requirements

Browse files
Files changed (1) hide show
  1. docker/Dockerfile +0 -85
docker/Dockerfile DELETED
@@ -1,85 +0,0 @@
1
- # Dockerfile for Hugging Face Spaces - Gradio Multi-Agent Assistant with MCP Toolbox
2
- # This deploys the complete multi-agent system with Cloud SQL access via MCP Toolbox
3
-
4
- FROM python:3.11-slim
5
-
6
- # Install system dependencies including Node.js
7
- RUN apt-get update && apt-get install -y \
8
- ca-certificates \
9
- curl \
10
- git \
11
- build-essential \
12
- gettext-base \
13
- && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
14
- && apt-get install -y nodejs \
15
- && rm -rf /var/lib/apt/lists/*
16
-
17
- # Install MCP Toolbox binary (v0.18.0)
18
- ARG TOOLBOX_VERSION=v0.18.0
19
- RUN ARCH=$(dpkg --print-architecture) && \
20
- if [ "$ARCH" = "amd64" ]; then \
21
- TOOLBOX_ARCH="amd64"; \
22
- elif [ "$ARCH" = "arm64" ]; then \
23
- TOOLBOX_ARCH="arm64"; \
24
- else \
25
- echo "Unsupported architecture: $ARCH" && exit 1; \
26
- fi && \
27
- curl -L "https://storage.googleapis.com/genai-toolbox/${TOOLBOX_VERSION}/linux/${TOOLBOX_ARCH}/toolbox" \
28
- -o /usr/local/bin/toolbox && \
29
- chmod +x /usr/local/bin/toolbox
30
-
31
- # Verify installations
32
- RUN python --version && node --version && npm --version && toolbox --version
33
-
34
- # Set working directory
35
- WORKDIR /app
36
-
37
- # Copy requirements first (for layer caching)
38
- COPY requirements.txt .
39
-
40
- # Install Python dependencies
41
- RUN pip install --no-cache-dir --upgrade pip && \
42
- pip install --no-cache-dir -r requirements.txt
43
-
44
- # Install npx-based MCP servers globally
45
- # CoinGecko MCP server for crypto data
46
- RUN npm install -g @coingecko/coingecko-mcp
47
-
48
- # Install uvx for Python-based MCP servers
49
- RUN pip install --no-cache-dir uv
50
-
51
- # Copy application code
52
- COPY src/ ./src/
53
- COPY ui/ ./ui/
54
-
55
- # Make src a proper Python package
56
- RUN find /app/src -type d -exec touch {}/__init__.py \;
57
-
58
- # Copy MCP Toolbox configuration
59
- COPY tools.yaml /app/tools.yaml
60
-
61
- # Create directory for temporary file uploads
62
- RUN mkdir -p /tmp/uploads && chmod 777 /tmp/uploads
63
-
64
- # Copy entrypoint script
65
- COPY docker/entrypoint-hf.sh /app/entrypoint.sh
66
- RUN chmod +x /app/entrypoint.sh
67
-
68
- # Set environment variables for Hugging Face Spaces
69
- ENV GRADIO_SERVER_NAME="0.0.0.0" \
70
- GRADIO_SERVER_PORT="7860" \
71
- PYTHONUNBUFFERED=1 \
72
- PYTHONPATH=/app
73
-
74
- # Expose Gradio port (HF Spaces expects 7860)
75
- EXPOSE 7860
76
-
77
- # Expose MCP Toolbox port (internal - for communication between services)
78
- EXPOSE 5000
79
-
80
- # Health check
81
- HEALTHCHECK --interval=30s --timeout=10s --start-period=90s --retries=3 \
82
- CMD curl -f http://localhost:7860/ || exit 1
83
-
84
- # Run Gradio app via entrypoint
85
- CMD ["/app/entrypoint.sh"]