8000 Fix docker orphan warnings, hanging localai_default network and ollama containers, and optimize start time through dependencies. by ytkaczyk · Pull Request #35 · coleam00/local-ai-packaged · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix docker orphan warnings, hanging localai_default network and ollama containers, and optimize start time through dependencies. #35

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ytkaczyk
Copy link

Addresses the following items:

warning msg=Found orphan containers

  • Fixed both when running the start_services.py script with no container running and with containers already running
  • Symptoms:
Running: docker compose -p localai --profile cpu -f docker-compose.yml up -d
time="2025-03-25T11:17:09-06:00" level=warning msg="Found orphan containers ([supabase-storage supabase-edge-functions supabase-auth supabase-kong supabase-rest supabase-meta supabase-studio supabase-pooler realtime-dev.supabase-realtime supabase-analytics supabase-db supabase-vector supabase-imgproxy]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up."
Running: docker compose -p localai -f supabase/docker/docker-compose.yml up -d
time="2025-03-25T11:19:33-06:00" level=warning msg="Found orphan containers ([ollama-pull-llama ollama]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up."
  • Fixed by including the supabase docker-compose file using the include top level element instead of using multiple -f arguments in the docker compose commands.
  • This allowed for proper dependencies checking and removing the 10 second delay

localai_default network not releases and ollama containers still running when running docker compose down command

  • Symptoms:
 ! Network localai_default                   Resource is still in use                                                                0.0s 

ollama containers not updated when running docker compose pull command

  • Symptoms: no ollama container displayed in the list when running the pull command

  • Fixed by adding the --profile to the docker pull command in the documentation

@coleam00 , I had to include one of the health checks from my other PR #34 since I added a dependency from n8n on qdrand and a health check was needed for that. I don't think it should but hope it doesn't create a conflict when you merge the two PRs but something to look out for.

@ytkaczyk
Copy link
Author

To help with testing. This is what the output looks like when running start_services.py with the current code (+++ in front of issues)

python start_services.py --profile cpu
Supabase repository already exists, updating...
Running: git pull
Already up to date.
Copying .env in root to .env in supabase/docker...
Checking SearXNG settings...
SearXNG settings.yml already exists at searxng\settings.yml
Generating SearXNG secret key...
Detected Windows platform, using PowerShell to generate secret key...
SearXNG secret key generated successfully.
Found running SearXNG container: searxng
Found uwsgi.ini inside the SearXNG container - not first run
Stopping and removing existing containers for the unified project 'localai'...
Running: docker compose -p localai -f docker-compose.yml -f supabase/docker/docker-compose.yml down
[+] Running 22/22
 ✔ Container caddy                           Removed                                                                                 0.2s 
 ✔ Container supabase-pooler                 Removed                                                                                 5.5s 
 ✔ Container redis                           Removed                                                                                 2.4s 
 ✔ Container open-webui                      Removed                                                                                 5.9s 
 ✔ Container supabase-meta                   Removed                                                                                10.6s 
 ✔ Container supabase-auth                   Removed                                                                                 1.2s 
 ✔ Container n8n                             Removed                                                                                 5.0s 
 ✔ Container supabase-edge-functions         Removed                                                                                11.0s 
 ✔ Container supabase-storage                Removed                                                                                 2.9s 
 ✔ Container searxng                         Removed                                                                                 4.7s 
 ✔ Container supabase-kong                   Removed                                                                                 5.1s 
 ✔ Container qdrant                          Removed                                                                                 3.4s 
 ✔ Container realtime-dev.supabase-realtime  Removed                                                                                 4.2s 
 ✔ Container flowise                         Removed                                                                                 4.5s 
 ✔ Container supabase-studio                 Removed                                                                                 1.6s 
 ✔ Container supabase-imgproxy               Removed                                                                                 2.4s 
 ✔ Container supabase-rest                   Removed                                                                                 2.7s 
 ✔ Container n8n-import                      Removed                                                                                 0.1s 
 ✔ Container supabase-analytics              Removed                                                                                10.7s 
 ✔ Container supabase-db                     Removed                                                                                 1.8s 
 ✔ Container supabase-vector                 Removed                                                                                11.7s 
+++ ollama containers missing
+++  ! Network localai_default                   Resource is still in use                                                                0.0s
Starting Supabase services...
Running: docker compose -p localai -f supabase/docker/docker-compose.yml up -d
+++ time="2025-03-25T11:19:33-06:00" level=warning msg="Found orphan containers ([ollama-pull-llama ollama]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up."
[+] Running 13/13
 ✔ **Container supabase-imgproxy**               Started                                                                                 1.4s 
 ✔ Container supabase-vector                 Healthy                                                                                 7.0s 
 ✔ Container supabase-db                     Healthy                                                                                24.3s 
 ✔ Container supabase-analytics              Healthy                                                                                23.1s 
 ✔ Container supabase-kong                   Started                                                                                23.8s 
 ✔ Container supabase-rest                   Started                                                                                23.5s 
 ✔ Container realtime-dev.supabase-realtime  Started                                                                                23.6s 
 ✔ Container supabase-meta                   Started                                                                                23.3s 
 ✔ Container supabase-edge-functions         Started                                                                                23.7s 
 ✔ Container supabase-auth                   Started                                                                                23.5s 
 ✔ Container supabase-studio                 Started                                                                                23.8s 
 ✔ Container supabase-pooler                 Started                                                                                23.8s 
 ✔ Container supabase-storage                Started                                                                                24.2s 
Waiting for Supabase to initialize...
Starting local AI services...
Running: docker compose -p localai --profile cpu -f docker-compose.yml up -d
+++ time="2025-03-25T11:20:08-06:00" level=warning msg="Found orphan containers ([supabase-storage supabase-studio supabase-auth supabase-pooler supabase-kong supabase-edge-functions supabase-meta realtime-dev.supabase-realtime supabase-rest supabase-analytics supabase-db supabase-vector supabase-imgproxy]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up."**
[+] Running 10/10
 ✔ Container open-webui         Started                                                                                              1.6s 
 ✔ Container n8n-import         Exited                                                                                               7.4s 
 ✔ Container searxng            Started                                                                                              1.0s 
 ✔ Container redis              Started                                                                                              1.2s 
 ✔ Container caddy              Started                                                                                              1.0s 
 ✔ Container flowise            Started                                                                                              1.7s 
 ✔ Container qdrant             Started                                                                                              1.6s 
 ✔ Container ollama             Running                                                                                              0.0s 
 ✔ Container ollama-pull-llama  Started                                                                                              1.1s 
 ✔ Container n8n                Started                                                                                              7.5s 

and this is the output with the suggested PR with all identified issues corrected:

python start_services.py --profile cpu
Supabase repository already exists, updating...
Running: git pull
Already up to date.
Copying .env in root to .env in supabase/docker...
Checking SearXNG settings...
SearXNG settings.yml already exists at searxng\settings.yml
Generating SearXNG secret key...
Detected Windows platform, using PowerShell to generate secret key...
SearXNG secret key generated successfully.
Found running SearXNG container: searxng
Found uwsgi.ini inside the SearXNG container - not first run
Stopping and removing existing containers for the unified project 'localai'...
Running: docker compose -p localai --profile cpu -f docker-compose.yml down
[+] Running 24/24
 ✔ Container flowise                         Removed                                                                                 5.2s 
 ✔ Container supabase-meta                   Removed                                                                                10.5s 
 ✔ Container ollama-pull-llama               Removed                                                                                 0.2s 
 ✔ Container supabase-studio                 Removed                                                                                 1.3s 
 ✔ Container supabase-kong                   Removed                                                                                 6.0s 
 ✔ Container supabase-storage                Removed                                                                                 2.4s 
 ✔ Container supabase-auth                   Removed                                                                                 2.0s 
 ✔ Container caddy                           Removed                                                                                 0.2s 
 ✔ Container supabase-edge-functions         Removed                                                                                10.7s 
 ✔ Container realtime-dev.supabase-realtime  Removed                                                                                 3.8s 
 ✔ Container supabase-pooler                 Removed                                                                                 5.8s 
 ✔ Container redis                           Removed                                                                                 3.0s 
 ✔ Container n8n                             Removed                                                                                 5.0s 
 ✔ Container searxng                         Removed                                                                                 4.7s 
 ✔ Container open-webui                      Removed                                                                                 6.2s 
 ✔ Container ollama                          Removed                                                                                 4.3s 
 ✔ Container supabase-rest                   Removed                                                                                 3.0s 
 ✔ Container supabase-imgproxy               Removed                                                                                 2.4s 
 ✔ Container n8n-import                      Removed                                                                                 0.1s 
 ✔ Container qdrant                          Removed                                                                                 1.3s 
 ✔ Container supabase-analytics              Removed                                                                                10.7s 
 ✔ Container supabase-db                     Removed                                                                                 2.0s 
 ✔ Container supabase-vector                 Removed                                                                                14.0s 
 ✔ Network localai_default                   Removed                                                                                 0.8s 
Starting all local AI services...
Running: docker compose -p localai --profile cpu -f docker-compose.yml up -d
[+] Running 24/24
 ✔ Network localai_default                   Created                                                                                 0.0s 
 ✔ Container open-webui                      Started                                                                                 2.4s 
 ✔ Container searxng                         Started                                                                                 2.1s 
 ✔ Container ollama                          Started                                                                                 2.4s 
 ✔ Container qdrant                          Healthy                                                                                14.0s 
 ✔ Container caddy                           Started                                                                                 1.9s 
 ✔ Container supabase-imgproxy               Started                                                                                 2.1s 
 ✔ Container flowise                         Started                                                                                 2.3s 
 ✔ Container supabase-vector                 Healthy                                                                                 7.5s 
 ✔ Container redis                           Started                                                                                 2.0s 
 ✔ Container ollama-pull-llama               Started                                                                                 2.3s 
 ✔ Container supabase-db                     Healthy                                                                                24.5s 
 ✔ Container supabase-analytics              Healthy                                                                                23.5s 
 ✔ Container n8n-import                      Exited                                                                                 17.4s 
 ✔ Container supabase-studio                 Started                                                                                24.1s 
 ✔ Container supabase-rest                   Started                                                                                23.6s 
 ✔ Container realtime-dev.supabase-realtime  Started                                                                                23.9s 
 ✔ Container supabase-auth                   Started                                                                                23.9s 
 ✔ Container supabase-edge-functions         Started                                                                                23.7s 
 ✔ Container supabase-kong                   Started                                                                                24.3s 
 ✔ Container supabase-pooler                 Started                                                                                24.2s 
 ✔ Container supabase-meta                   Started                                                                                24.0s 
 ✔ Container n8n                             Started                                                                                17.5s 
 ✔ Container supabase-storage                Started                                                                                24.1s 

@coleam00 coleam00 added the enhancement New feature or request label May 12, 2025
@coleam00
Copy link
Owner

@ytkaczyk So sorry that it took me so long to get to this PR! I really appreciate your work. Someone in the Dynamous community has been helping me some with this package and he created this PR which I merged recently:

#51

I think that covers a lot of the same things, but maybe you could take a look if you are willing and see if there is a more atomic PR you could make that covers something here that isn't in 51?

@coleam00 coleam00 added the question Further information is requested label May 12, 2025
@ytkaczyk
Copy link
Author
ytkaczyk commented May 14, 2025

Hi @coleam00 . Thank you for the feedback and for sharing the new PR.

If there had been any concerns about my original PR like the additional health checks, I would have been more than happy to amend it. I think collaborating on improvements might have helped to ensure that all intended code was included and to maintain authorship continuity. I’d appreciate it if you could reference the original PR in the new one and in the commit message, for attribution purposes.

It looks like at least one change didn’t make it into the merged PR—I’ll go ahead and submit a follow-up when I get a chance. Please don’t hesitate to reach out if there’s anything I can adjust in it or if you have any preferences for PR messages and so forth.

Thanks again for your work on this project and for everything you share with the open source community. I’m excited to continue contributing as I’m able.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0