phidatahq / phidata

Build AI Assistants with memory, knowledge and tools.
https://docs.phidata.com
Mozilla Public License 2.0
10.45k stars 1.51k forks source link

phi ws up not docker friendly on ubuntu 22.04 #1024

Closed j2l closed 1 week ago

j2l commented 1 week ago

Hello, On Ubuntu, I need to manually pip install docker. phi ws up throws:

Starting workspace: django-app

--**-- Confirm resources to create:
  -+-> Network: django
  -+-> Container: django-dev-db
  -+-> Container: django-dev-app

Network: django
Total 3 resources

Confirm deploy [Y/n]: 

-==+==- Network: django
ERROR    Failed to create Network: django                                                                         
ERROR    404 Client Error for http+docker://localhost/v1.43/networks/create: Not Found ("could not find an        
         available, non-overlapping IPv4 address pool among the defaults to assign to the network")               
ERROR    Please fix and try again...                                                                              

-==+==- Container: django-dev-db
Starting container: django-dev-db
ERROR    APIError: network django not found                                                                       
ERROR    Failed to create Container: django-dev-db                                                                
ERROR    404 Client Error for                                                                                     
         http+docker://localhost/v1.43/containers/75e6334d00c8d1285fd0996dfb13ae13b18cd6711a054c477fb5a08a47ad6fe7
         /start: Not Found ("network django not found")                                                           
ERROR    Please fix and try again...                                                                              

-==+==- Container: django-dev-app
Starting container: django-dev-app
ERROR    APIError: network django not found                                                                       
ERROR    Failed to create Container: django-dev-app                                                               
ERROR    404 Client Error for                                                                                     
         http+docker://localhost/v1.43/containers/52606eeb3b66307c9c3b7359096a0f869e068606d07093fb123869180bb9bd9f
         /start: Not Found ("network django not found")                                                           
ERROR    Please fix and try again...      

I read docs about sudo ln -s "$HOME/.docker/run/docker.sock" /var/run/docker.sock but it's already present ln: failed to create symbolic link '/var/run/docker.sock': File exists Docker is working fine for years on my ubuntu desktop, and it doesn't need sudo, I can run docker ps as user and it lists running containers. Is phi written for Mac? Do you have a docker-compose with only django-dev-app and django-dev-db?

j2l commented 1 week ago

My bad, I had too many docker networks previously created, after deleting a dozen, it works.