Dockerfile 849 Bytes
Newer Older
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
FROM python:3.12-slim

# Set working directory
WORKDIR /app

# Configure pip to use Alibaba Cloud mirror
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

# Install dependencies
RUN pip install --no-cache-dir poetry

# Copy project files
COPY pyproject.toml .
COPY README.md .
COPY src/ ./src/

# Install the package
RUN poetry config virtualenvs.create false && \
    poetry install

# Create downloads directory
RUN mkdir -p /app/downloads

# Set environment variables
ENV OUTPUT_DIR=/app/downloads
# MINERU_API_KEY should be provided at runtime
ENV MINERU_API_BASE=https://mineru.net
ENV USE_LOCAL_API=false
ENV LOCAL_MINERU_API_BASE=""

# Expose the port that SSE will run on
EXPOSE 8001

# Set command to start the service with SSE transport
CMD ["mineru-mcp", "--transport", "sse", "--output-dir", "/app/downloads"]