Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build is missing langchain packages #1126

Closed
azertylr opened this issue Feb 10, 2025 · 3 comments · Fixed by #1167
Closed

Docker build is missing langchain packages #1126

azertylr opened this issue Feb 10, 2025 · 3 comments · Fixed by #1167

Comments

@azertylr
Copy link
Contributor

Describe the bug
Hello,
When building the docker image, some langchain packages are missing. At least langchain-google-genai and langchain-mistralai

To Reproduce
Run with the following docker file:

services:
  gpt-researcher:
    build: https://github.com/assafelovic/gpt-researcher.git
    environment: 
      GOOGLE_API_KEY: 
      LOGGING_LEVEL: INFO
      FAST_LLM: "google_genai:gemini-1.5-flash"
      SMART_LLM: "google_genai:gemini-1.5-pro"
      STRATEGIC_LLM: "google_genai:gemini-1.5-pro"
      EMBEDDING: "google_genai:models/text-embedding-004"
    volumes:
      - /home/docker/gptr/my-docs:/usr/src/app/my-docs:rw
      - /home/docker/gptr/outputs:/usr/src/app/outputs:rw
      - /home/docker/gptr/logs:/usr/src/app/logs:rw
    restart: always
    ports:
      - 8000:8000

There is an error, saying langchain_google_genai is missing.

Running pip install langchain_google_genai in the container solves the problem.

Additional context

Docker engine: 27.5.1
Host: ubuntu 24.04

@ElishaKay
Copy link
Collaborator

Welcome @azertylr,

This is intentional. The motivation is to keep the base GPTR container as light as possible.

Our recommendation is to add your LLM-specific dependencies to the requirements.txt file

May the force be with you 🙏

@azertylr
Copy link
Contributor Author

Thanks for your reply!
Maybe you could update the docker help? https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker

@ElishaKay
Copy link
Collaborator

Sup @azertylr

Happy to get your name into the Git tree if you'd like to update that doc

You can use something similar to what we used here in supported-llms, specifically, the line: "Please note that you'll need to install the relevant langchain package for each LLM" and link to that doc from the docker doc

May the force be with you 🙏

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 a pull request may close this issue.

2 participants