Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM python:3.13-slim-bullseye
FROM python:3.13-slim-trixie

ENV DEBIAN_FRONTEND=noninteractive
ENV EXIFTOOL_PATH=/usr/bin/exiftool
ENV FFMPEG_PATH=/usr/bin/ffmpeg
ENV ORT_DISABLE_TELEMETRY=1

# Runtime dependency
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
exiftool
libimage-exiftool-perl

ARG INSTALL_GIT=false
RUN if [ "$INSTALL_GIT" = "true" ]; then \
Expand Down
25 changes: 12 additions & 13 deletions packages/markitdown-mcp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
FROM python:3.13-slim-bullseye
FROM python:3.13-slim-trixie

ENV DEBIAN_FRONTEND=noninteractive
ENV EXIFTOOL_PATH=/usr/bin/exiftool
ENV FFMPEG_PATH=/usr/bin/ffmpeg
ENV MARKITDOWN_ENABLE_PLUGINS=True
ENV ORT_DISABLE_TELEMETRY=1

# Runtime dependency
# NOTE: Add any additional MarkItDown plugins here
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
exiftool

# Cleanup
RUN rm -rf /var/lib/apt/lists/*
# Runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ffmpeg \
libimage-exiftool-perl \
&& rm -rf /var/lib/apt/lists/*

COPY . /app
RUN pip --no-cache-dir install /app

RUN pip install --no-cache-dir /app

WORKDIR /workdir

# Default USERID and GROUPID
ARG USERID=nobody
ARG GROUPID=nogroup

USER $USERID:$GROUPID
USER ${USERID}:${GROUPID}

ENTRYPOINT [ "markitdown-mcp" ]
ENTRYPOINT ["markitdown-mcp"]
5 changes: 5 additions & 0 deletions packages/markitdown-mcp/src/markitdown_mcp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
from collections.abc import AsyncIterator
from mcp.server.fastmcp import FastMCP
from mcp.server.fastmcp.server import Settings
from starlette.applications import Starlette
from mcp.server.sse import SseServerTransport
from starlette.requests import Request
Expand All @@ -13,6 +14,10 @@
from markitdown import MarkItDown
import uvicorn

# Resolve the forward reference in Settings.lifespan before the model is first
# instantiated, otherwise pydantic-settings emits IncompleteFieldDefinitionWarning.
Settings.model_rebuild()

# Initialize FastMCP server for MarkItDown (SSE)
mcp = FastMCP("markitdown")

Expand Down