Skip to content

Optimize Dockerfile#75

Open
MH0386 wants to merge 12 commits intoqdrant:masterfrom
MH0386:optimize-dockerfile
Open

Optimize Dockerfile#75
MH0386 wants to merge 12 commits intoqdrant:masterfrom
MH0386:optimize-dockerfile

Conversation

@MH0386
Copy link
Copy Markdown

@MH0386 MH0386 commented Jul 15, 2025

This pull request updates the Dockerfile to use a newer Python base image, improve package management, and enhance configurability for the server. Key changes include upgrading the Python version, switching to a more efficient package installation method, and adding a new environment variable to allow the server to listen on all network interfaces.

Base image and package management updates:

  • Updated the base image from python:3.11-slim to python:3.13-slim for compatibility with the latest Python features and improvements.
  • Replaced the pip-based installation of the uv package with a pre-built binary from ghcr.io, improving efficiency and reducing build complexity.
  • Updated the command to install the mcp-server-qdrant package using the uv tool install command instead of uv pip install, aligning with the new package management approach.

Server configuration improvements:

  • Added the FASTMCP_HOST environment variable to make the server listen on all network interfaces (0.0.0.0), improving accessibility in containerized environments.
  • Updated the CMD instruction to use a JSON array format for better compatibility with Docker's execution model.

@kacperlukawski kacperlukawski requested review from Copilot and joein July 21, 2025 14:48

This comment was marked as outdated.

@MH0386 MH0386 marked this pull request as ready for review July 25, 2025 00:23
@MH0386 MH0386 requested a review from Copilot July 25, 2025 13:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR optimizes the Dockerfile by upgrading the Python base image, modernizing package management with uv, and improving server network accessibility in containerized environments.

  • Upgrades Python base image from 3.11-slim to 3.13-slim
  • Switches from pip-based uv installation to pre-built binary from ghcr.io
  • Adds FASTMCP_HOST environment variable to enable network interface binding
Comments suppressed due to low confidence (1)

Dockerfile:6

  • The uv version 0.8.3 may not exist. As of my knowledge cutoff in January 2025, the latest stable versions were in the 0.4.x range. Please verify that version 0.8.3 is available at ghcr.io/astral-sh/uv before using it.
COPY --from=ghcr.io/astral-sh/uv:0.8.3 /uv /uvx /bin/

Comment thread Dockerfile
mahmoudimus pushed a commit to mahmoudimus/mcp-server-qdrant that referenced this pull request Nov 17, 2025
This commit consolidates changes from PRs qdrant#92, qdrant#75, qdrant#77, qdrant#90, qdrant#20, qdrant#89, qdrant#78, qdrant#76, and qdrant#68:

Infrastructure & Configuration (PR qdrant#75, qdrant#77):
- Upgrade Dockerfile to Python 3.13-slim
- Use UV 0.8.3 from official image
- Add FASTMCP_HOST="0.0.0.0" for container networking
- Add SettingsConfigDict for proper None value parsing

New Embedding Providers (PR qdrant#76, qdrant#92):
- Add Model2Vec support for fast, lightweight embeddings
- Add OpenAI-compatible API support (oai_compat)
- New settings: OAI_COMPAT_ENDPOINT, OAI_COMPAT_API_KEY, OAI_COMPAT_VEC_SIZE

Unnamed Vectors & Multiple Collections (PR qdrant#78):
- Add support for Qdrant unnamed vectors
- Create UnnamedVectorProvider wrapper
- Add USE_UNNAMED_VECTORS and COLLECTION_NAMES settings
- Update qdrant.py to handle both named and unnamed vectors
- Add __main__.py for python -m execution

Hybrid Search (PR qdrant#90):
- Implement hybrid search combining dense and sparse vectors
- Add find_hybrid() method with RRF and DBSF fusion methods
- New tool: qdrant-hybrid-find
- Add SPARSE_EMBEDDING_MODEL setting
- Support configurable limits for dense, sparse, and final results

Optional Collection Names (PR qdrant#89):
- Make collection_name parameter optional in store() and find()
- Use default collection when not specified
- Simplify tool usage with fallback to COLLECTION_NAME env var

Additional Tools (PR qdrant#68):
- Add qdrant-get-point: Retrieve point by ID
- Add qdrant-delete-point: Delete point by ID
- Add qdrant-update-point-payload: Update point metadata
- Add qdrant-get-collections: List all collections
- Add qdrant-get-collection-details: Get collection info
- Implement corresponding methods in QdrantConnector

Documentation:
- Update README with all new features
- Document new embedding providers
- Add examples for unnamed vectors and multiple collections
- Update environment variables table
- Document hybrid search functionality
- Expand tools documentation

Dependencies:
- Add model2vec==0.6.0
- Add openai>=1.109.1
mahmoudimus added a commit to mahmoudimus/mcp-server-qdrant that referenced this pull request Nov 17, 2025
This commit consolidates changes from PRs qdrant#92, qdrant#75, qdrant#77, qdrant#90, qdrant#20, qdrant#89, qdrant#78, qdrant#76, and qdrant#68:

Infrastructure & Configuration (PR qdrant#75, qdrant#77):
- Upgrade Dockerfile to Python 3.13-slim
- Use UV 0.8.3 from official image
- Add FASTMCP_HOST="0.0.0.0" for container networking
- Add SettingsConfigDict for proper None value parsing

New Embedding Providers (PR qdrant#76, qdrant#92):
- Add Model2Vec support for fast, lightweight embeddings
- Add OpenAI-compatible API support (oai_compat)
- New settings: OAI_COMPAT_ENDPOINT, OAI_COMPAT_API_KEY, OAI_COMPAT_VEC_SIZE

Unnamed Vectors & Multiple Collections (PR qdrant#78):
- Add support for Qdrant unnamed vectors
- Create UnnamedVectorProvider wrapper
- Add USE_UNNAMED_VECTORS and COLLECTION_NAMES settings
- Update qdrant.py to handle both named and unnamed vectors
- Add __main__.py for python -m execution

Hybrid Search (PR qdrant#90):
- Implement hybrid search combining dense and sparse vectors
- Add find_hybrid() method with RRF and DBSF fusion methods
- New tool: qdrant-hybrid-find
- Add SPARSE_EMBEDDING_MODEL setting
- Support configurable limits for dense, sparse, and final results

Optional Collection Names (PR qdrant#89):
- Make collection_name parameter optional in store() and find()
- Use default collection when not specified
- Simplify tool usage with fallback to COLLECTION_NAME env var

Additional Tools (PR qdrant#68):
- Add qdrant-get-point: Retrieve point by ID
- Add qdrant-delete-point: Delete point by ID
- Add qdrant-update-point-payload: Update point metadata
- Add qdrant-get-collections: List all collections
- Add qdrant-get-collection-details: Get collection info
- Implement corresponding methods in QdrantConnector

Documentation:
- Update README with all new features
- Document new embedding providers
- Add examples for unnamed vectors and multiple collections
- Update environment variables table
- Document hybrid search functionality
- Expand tools documentation

Dependencies:
- Add model2vec==0.6.0
- Add openai>=1.109.1

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants