File size: 1,316 Bytes
ccb4ebf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4c77a03
 
 
 
ccb4ebf
 
4c77a03
 
 
 
ced10c9
 
345ec7b
ced10c9
 
cb70f13
 
ced10c9
 
 
 
345ec7b
499f14c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM python:3.12-slim

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
    curl \
    wget \
    git \
    vim \
    nano \
    unzip \
    zip \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
    apt-get install -y nodejs && \
    rm -rf /var/lib/apt/lists/*

RUN curl -LsSf https://astral.sh/uv/install.sh | sh

ENV PATH=/root/.local/bin:$PATH
ENV UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple/
ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/

RUN pip install --no-cache-dir pydantic mcp-proxy

RUN pip install --no-cache-dir fastmcp crawl4ai trafilatura

RUN pip install --no-cache-dir gradio mcp openai -U

RUN python -m playwright install --with-deps chromium

RUN git clone https://github.com/modelscope/mcp-central.git

WORKDIR /app/mcp-central/examples/lite_research

RUN --mount=type=secret,id=MODEL_TOKEN,mode=0444,required=true \
    export MODEL_TOKEN=$(cat /run/secrets/MODEL_TOKEN)

ENV MODEL_TOKEN=${MODEL_TOKEN}

RUN echo ${MODEL_TOKEN}

RUN --mount=type=secret,id=TAVILY_API_KEY,mode=0444,required=true \
    export TAVILY_API_KEY=$(cat /run/secrets/TAVILY_API_KEY)

ENV TAVILY_API_KEY=${TAVILY_API_KEY}

CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]