File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
src/modelscope_mcp_server Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,24 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
99# Set working directory
1010WORKDIR /app
1111
12- # Copy project files
12+ # Copy dependency files first for better caching
13+ COPY pyproject.toml uv.lock ./
14+
15+ # Install dependencies first (this layer will be cached if dependencies don't change)
16+ RUN uv sync --frozen --no-install-project
17+
18+ # Copy the rest of the project files
1319COPY . /app
1420
15- # Sync dependencies and install project
21+ # Install the project itself (this will be much faster as dependencies are already installed)
1622RUN uv sync --frozen
1723
1824# Create a non-root user
1925RUN adduser -D -u 1000 mcpuser && chown -R mcpuser:mcpuser /app
2026USER mcpuser
2127
22- # Set entrypoint and default arguments
23- ENTRYPOINT ["uv" , "run" , "modelscope-mcp-server" ]
28+ # Use virtual environment activation and direct Python execution
29+ # Avoid "uv run" to prevent runtime project rebuilding and reduce startup overhead
30+ ENTRYPOINT [".venv/bin/python" , "-m" , "modelscope_mcp_server" ]
31+
2432CMD []
Original file line number Diff line number Diff line change 11"""Version information for ModelScope MCP Server."""
22
3- __version__ = "0.1.4 "
3+ __version__ = "0.1.5.dev1 "
You can’t perform that action at this time.
0 commit comments