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 development profile fixes: Ollama #329

Closed

Conversation

chrismahoney
Copy link
Collaborator

@chrismahoney chrismahoney commented Nov 18, 2024

Issue

Docker 'development' profile has not been working well or at all for folks running Ollama. This may also relate to using other providers via a Docker-based oTToDev instance. Here's the situation:

Setup

  • Your .env.local must specify a base URL for Ollama; http://localhost:11434 if you're running oTToDev alongside Ollama locally, http://host.docker.internal:11434 if you're running oTToDev in a container with Ollama locally. If both are in a container, they should both be on the same virtual network and you would use http://[docker vnet host for ollama]:11434. I feel that scenario is out of scope for now in terms of us providing technical support to run Ollama.

Docker development (with Ollama running on local machine)

  • OLLAMA_BASE_API_URL in .env.local MUST be set to http://host.docker.internal:11434
  • Run under docker compose: pnpm run dockerbuild && docker compose --profile development up
  • pnpm run dockerrun may want to be adjusted or removed; Not focused on that just for this PR however.

Local development (oTToDev and Ollama running on local machine)

FIX

  • .env.local is present in .dockerignore, ensuring it will not be available during build process or when running via Docker Compose. This PR removes that.
  • The env_file for Docker development profile is not set, this PR sets it to .env.local. We probably want to use .env for production instead of its current state of .env.local as well.
  • I would suggest that instead of running development with .env.local, we may want to have three tiers
    • .env.local: Fully local run via pnpm run dev, this is actually local
    • .env.dev: We would use this for Docker while using the development profile
    • .env: The real .env for actual production runs.

I'd like to see if we can get some docker folks to test their environments with these changes, I know there are several solutions out there as existing Pull Requests but I feel like this one involves the least amount of future maintenance.

Copy link
Collaborator

@coleam00 coleam00 left a comment

Choose a reason for hiding this comment

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

When you say "Docker 'development' profile has not been working well or at all for folks running Ollama", what is it you are referring to? I'd like to know what issues you have in mind that this is addressing!

@dustinwloring1988 dustinwloring1988 added the question Further information is requested label Dec 2, 2024
@chrismahoney chrismahoney closed this by deleting the head repository Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants