Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
43 changes: 43 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Git files
.git
.gitignore
.github

# Python cache
__pycache__
*.pyc
*.pyo
*.pyd
.Python
*.so
*.egg
*.egg-info
dist
build
.eggs

# IDE
.vscode
.idea
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Documentation
README.md
*.md
assets/

# Development
.env
.env.local
venv/
env/
ENV/

# UV cache
.uv/
74 changes: 74 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build and Push Docker Image

on:
push:
branches:
- main
- master
tags:
- 'v*'
pull_request:
branches:
- main
- master
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push Docker image
id: build
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Generate artifact attestation
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dockerfile for blender-mcp MCP server
FROM python:3.11-slim

# Install UV package manager
RUN pip install uv

# Set working directory
WORKDIR /app

# Copy project files
COPY pyproject.toml uv.lock ./
COPY src/ ./src/
COPY main.py ./

# Install dependencies
RUN uv pip install --system -e .

# Set environment variables
ENV BLENDER_HOST=host.docker.internal
ENV BLENDER_PORT=9876

# Expose MCP server port (stdio-based, no port needed)
# The server communicates via stdin/stdout

# Run the MCP server via the console script to avoid double-import warnings
CMD ["blender-mcp"]
4 changes: 4 additions & 0 deletions Dockerfile.vllm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM vllm/vllm-openai:v0.8.5.post1

# Install missing dependencies required by DeepSeek-OCR model
RUN pip install --no-cache-dir addict easydict matplotlib
Comment on lines +1 to +4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify dependencies are truly required and add version pinning.

The comment states these packages are required by DeepSeek-OCR, but there's no evidence that they aren't already transitive dependencies of the vLLM base image or that they're not pinned elsewhere. Additionally, the pip packages lack explicit versions, which could lead to reproducibility issues or incompatibilities with future releases.

To verify that addict, easydict, and matplotlib are indeed required (and not already included in the base image), consider running:

If these packages are confirmed to be required, apply version constraints to prevent future breakage:

-RUN pip install --no-cache-dir addict easydict matplotlib
+RUN pip install --no-cache-dir addict>=1.0.0 easydict>=0.9.0 matplotlib>=3.5.0

Adjust version numbers based on compatibility testing.


🏁 Script executed:

#!/bin/bash
# Check if packages are already in the vllm base image or if they break without them
# This would require access to a running container, but we can at least verify
# that the package versions pinned here work together and with the base image.

# For now, search the repo for any documentation or tests that reference these packages
rg -i "deepseek-ocr|addict|easydict|matplotlib" --type md --type py -C 3

Length of output: 2600


Remove unnecessary matplotlib dependency and add version pinning for required packages.

DeepSeek-OCR's official requirements specify addict and easydict as dependencies, which are correctly included. However, matplotlib is not documented in DeepSeek-OCR's requirements and does not appear in the codebase. Additionally, the packages lack explicit version constraints, risking compatibility issues.

Suggested fix:

  • Remove matplotlib (unnecessary)
  • Pin versions for addict and easydict to match tested configurations
🤖 Prompt for AI Agents
In Dockerfile.vllm around lines 1-4, remove the unnecessary matplotlib install
and pin the required packages to known-good versions; update the RUN pip install
line to only install addict and easydict with explicit version constraints (for
example addict==2.4.0 and easydict==1.9) to avoid future compatibility issues
and keep the image minimal.

Loading