Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

fix ollama container for CPU vs GPU modem, there was a health check for ollama, which checked the GPU profile and therefore required that the user had a GPU

Fixes #1390 #1315

Type of Change

  • Bug fix

Testing

Tested by running manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Sep 20, 2025 6:43pm
sim Ready Ready Preview Comment Sep 20, 2025 6:43pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR fixes critical Docker Compose configuration issues that prevented Ollama from running in CPU-only environments. The main problem was that the simstudio service had a hard dependency on the ollama service being healthy, but when using the --profile cpu flag, only the ollama-cpu service would start, causing dependency resolution failures.

The changes address several interconnected issues:

  1. Profile Segregation: Added the gpu profile to the main ollama service (lines 100-101), ensuring proper separation between GPU and CPU deployment modes

  2. Dependency Management: Removed the hard dependency on ollama from the simstudio service (lines 25-31), eliminating the deployment failure when running in CPU mode

  3. Health Check Improvements: Replaced unreliable HTTP-based health checks with ollama list commands (lines 123, 147), providing more robust service health detection

  4. Service Discovery: Added network aliases to the ollama-cpu service (lines 153-156), ensuring proper service discovery and communication in CPU-only deployments

  5. Startup Logic: Refactored the model-setup service from hard dependencies to polling-based startup logic (lines 167-171), eliminating race conditions during container initialization

These changes ensure that the Docker Compose configuration works seamlessly in both GPU-enabled and CPU-only environments while maintaining the same functional behavior. The fix resolves issues #1390 and #1315 related to deployment failures on systems without GPU support.

PR Description Notes:

  • Minor typo: "CPU vs GPU modem" should be "CPU vs GPU mode"

Confidence score: 4/5

  • This PR addresses well-defined deployment issues with targeted fixes that resolve CPU-only environment failures
  • Score reflects solid understanding of Docker Compose profiles and service dependencies, with changes that directly address the root causes
  • Pay close attention to the dependency removal in simstudio service and the new polling logic in model-setup service

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

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