SciPhi-AI / R2R

The Elasticsearch for RAG. Build, scale, and deploy production-ready Retrieval-Augmented Generation applications
https://r2r-docs.sciphi.ai/
MIT License
3.2k stars 231 forks source link

Not supported URL scheme http+docker #733

Open fahdmirza opened 1 month ago

fahdmirza commented 1 month ago

Hello, I am trying to install R2R locally on an Ubuntu 22.04 system and following are the steps I followed and then got the error:

conda create -n r2r python=3.11 -y && conda activate r2r pip install r2r r2r --config-name=local_ollama serve --docker

Error: docker.errors.DockerException: Error while fetching server API version: Not supported URL scheme http+docker

My docker version: (r2r) Ubuntu@0136-ict-prxmx50056:~$ docker --version Docker version 27.0.3, build 7d4bcd8

Ollama is already running on default host and port. What I am missing here?

emrgnt-cmplxty commented 1 month ago

We have not seen this error before, and I am not immediately sure what the most likely source is. Here are some debugging tips from Claude 3.5, based on the information you have provided and our codebase:

  1. Docker Configuration: The error message suggests there's an issue with the Docker configuration. Specifically, it mentions "Not supported URL scheme http+docker". This could indicate that the Docker daemon is not properly configured or accessible.

  2. Docker Socket: The compose file includes a volume mount for the Docker socket (/var/run/docker.sock:/var/run/docker.sock:ro). Make sure this file exists and has the correct permissions.

  3. Docker Network: The compose files define a custom network (r2r-network). Ensure that this network is being created correctly and that all services can communicate over it.

  4. Ollama Configuration: The error mentions that Ollama is already running on the default host and port. This could potentially cause conflicts with the Ollama service defined in the Docker Compose file.

  5. Environment Variables: The R2R service in the compose file uses several environment variables. Make sure these are properly set, especially OLLAMA_API_BASE.

Given these potential issues, here are some steps to troubleshoot:

  1. Check Docker Installation: Ensure Docker is installed correctly and the Docker daemon is running.

    sudo systemctl status docker
  2. Check Docker Socket: Verify the Docker socket file exists and has the correct permissions.

    ls -l /var/run/docker.sock
  3. Docker Network: Try manually creating the Docker network before running the compose file:

    docker network create r2r-network
  4. Ollama Conflict: If Ollama is already running on the host, stop it before running the Docker Compose setup:

    sudo systemctl stop ollama
  5. Environment Variables: Double-check that all required environment variables are set correctly, especially OLLAMA_API_BASE. You might want to explicitly set this in your .env file or when running the command:

    OLLAMA_API_BASE=http://ollama:11434 r2r --config-name=local_ollama serve --docker
  6. Docker Compose Version: Ensure you're using a recent version of Docker Compose that supports the condition: service_healthy syntax.

  7. Run with Verbose Output: Try running the command with verbose output to get more information:

    r2r --config-name=local_ollama serve --docker --verbose

If none of these steps resolve the issue, it might be helpful to check the Docker logs for more detailed error messages:

docker-compose logs

This should provide more context about what's happening when the services try to start up.

mabry1985 commented 1 month ago

I saw this issue earlier tonight and updating docker compose seems to have solved it