fix(provider) add full dependencies to Docker image#1508
fix(provider) add full dependencies to Docker image#1508ekzhu wants to merge 6 commits intoagentscope-ai:mainfrom
Conversation
The Dockerfile was installing only base dependencies (`pip install .`), missing the ollama Python SDK which is an optional extra. Changed to `pip install '.[ollama]'` so the Docker image includes ollama support out of the box. Also added several third-party packages to base dependencies that were imported unconditionally but never declared: python-frontmatter (used in skills_manager.py and skills_hub.py), and document-processing libraries used by built-in skills (defusedxml, lxml, pypdf, pdf2image, pdfplumber, openpyxl). https://claude.ai/code/session_01GFwf7ZkAsLFNxqSATvL13w
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses critical dependency issues, ensuring the proper functioning of the application both within Docker containers and in local installations. It specifically resolves the omission of the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses missing dependencies for ollama and various built-in skills. The Dockerfile is updated to install optional ollama dependencies, and pyproject.toml is updated with several packages required for document processing skills. The changes are logical and well-explained. I have one minor suggestion to improve code maintainability by sorting the newly added dependencies.
There was a problem hiding this comment.
Pull request overview
Updates packaging and container build so runtime dependencies required by built-in skills and the Ollama provider are present by default, avoiding import/runtime failures in common deployments (notably Docker).
Changes:
- Add several previously-undeclared third-party libraries to
pyproject.tomlruntime dependencies (frontmatter, XML/PDF/Excel-related). - Update Docker image build to install the project with the
ollamaextra (pip install '.[ollama]') so the Ollama Python SDK is included.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
pyproject.toml |
Declares additional runtime dependencies used by core modules and built-in skill scripts. |
deploy/Dockerfile |
Installs the package with the ollama extra so import ollama works inside the container. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes missing runtime dependencies by declaring several third-party libraries in the base pyproject.toml dependencies (used by core skills/skills hub and built-in document/PDF skills) and ensuring the Docker image includes the ollama Python SDK by installing the ollama extra.
Changes:
- Add missing document/PDF/skills-hub Python dependencies to
pyproject.toml(e.g.,python-frontmatter,defusedxml,lxml,pypdf, etc.). - Update Docker image to install
copawwith theollamaextra (pip install '.[ollama]'). - Add system packages in Docker needed by document/PDF tooling (
poppler-utils,libreoffice).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pyproject.toml |
Declares previously-undeclared third-party dependencies used by core skills hub/manager and built-in document/PDF skills. |
deploy/Dockerfile |
Installs copaw with the ollama extra and adds OS packages needed for PDF/image and Office conversions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Updates packaging and the Docker runtime image to ensure document-processing skills and provider integrations have required Python and OS-level dependencies available at install/build time.
Changes:
- Declare several previously-undeclared third-party Python dependencies in
pyproject.toml(XML/Office/PDF + frontmatter/YAML). - Install additional OS packages in the Docker image to support PDF/image conversion and Office conversions.
- Switch Docker build to install the project with the
fullextra (pip install '.[full]').
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
pyproject.toml |
Adds missing runtime dependencies and confirms full extra definition. |
deploy/Dockerfile |
Installs Poppler + LibreOffice and switches pip install to .[full] for a more feature-complete image. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| poppler-utils \ | ||
| libreoffice \ |
| # Inject console dist from build stage (repo does not commit dist). | ||
| COPY --from=console-builder /app/console/dist/ ./src/copaw/console/ | ||
| RUN pip install --no-cache-dir . | ||
| RUN pip install --no-cache-dir '.[full]' |
| "pdfplumber>=0.10.0", | ||
| "pypdf>=4.0.0", | ||
| "python-frontmatter>=1.1.0", | ||
| "PyYAML>=6.0.0", |
Description
The Docker image is missing many dependencies. Added "full" extra so it install all dependencies.
Additionally, 7 third-party packages used by core code and built-in skills were never declared as dependencies in
pyproject.toml:python-frontmatter— imported at module level inskills_manager.pyandskills_hub.py(causes crash on import without it)defusedxml— used across 21 files in docx/xlsx/pptx skill scripts for secure XML parsinglxml— used in 6 validator files across docx/xlsx/pptx skillspypdf— used in PDF skill scripts (form filling, field extraction)pdf2image— used for PDF-to-image conversionpdfplumber— used for PDF form structure extractionopenpyxl— used in Excel recalc skill scriptRelated Issue: N/A
Security Considerations: N/A
Type of Change
Component(s) Affected
Checklist
pre-commit run --all-fileslocally and it passespytestor as relevant) and they passTesting
import ollamasucceeds inside the containerpip install .from pyproject.toml and verifypython -c "import frontmatter"succeedspytestto check for regressionsLocal Verification Evidence