Dockerfile 849 B

1234567891011121314151617181920212223242526272829303132333435
  1. FROM python:3.12-slim
  2. # Set working directory
  3. WORKDIR /app
  4. # Configure pip to use Alibaba Cloud mirror
  5. RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
  6. # Install dependencies
  7. RUN pip install --no-cache-dir poetry
  8. # Copy project files
  9. COPY pyproject.toml .
  10. COPY README.md .
  11. COPY src/ ./src/
  12. # Install the package
  13. RUN poetry config virtualenvs.create false && \
  14. poetry install
  15. # Create downloads directory
  16. RUN mkdir -p /app/downloads
  17. # Set environment variables
  18. ENV OUTPUT_DIR=/app/downloads
  19. # MINERU_API_KEY should be provided at runtime
  20. ENV MINERU_API_BASE=https://mineru.net
  21. ENV USE_LOCAL_API=false
  22. ENV LOCAL_MINERU_API_BASE=""
  23. # Expose the port that SSE will run on
  24. EXPOSE 8001
  25. # Set command to start the service with SSE transport
  26. CMD ["mineru-mcp", "--transport", "sse", "--output-dir", "/app/downloads"]