def _handle_paths(self, path):
        """Adds a volume mount if path exists, otherwise add URL."""
        parsed = urlparse(path)
        if parsed.scheme in ["file", ""] and parsed.netloc == "":
            if os.path.exists(parsed.path):
                fpath = os.path.realpath(parsed.path)
                self.engine.add(["-v", f"{fpath}:/docs/{fpath}:ro,z"])
            else:
                raise ValueError(f"{path} does not exist")
            return
        self.urls.append(path)
Adds a volume mount if path exists, otherwise add URL.
ramalama/rag.py