haystack icon indicating copy to clipboard operation
haystack copied to clipboard

launch_milvus() fails as milvus_dir != '/home/$USER/milvus/'

Open t0r0id opened this issue 3 years ago • 0 comments

Describe the bug launch_milvus() fails when Path.home() is not same as /home/$USER/milvus/

milvus docker-compose.yml is stored inside Path.home()

  milvus_dir = Path.home() / "milvus"
 ......
  with open(milvus_dir / "docker-compose.yml", "wb") as f:
        f.write(request.content)

While docker compose is initiated using

status = subprocess.run(["cd /home/$USER/milvus/ && docker-compose up -d"], shell=True)

Error message Error that was thrown (if available)

/bin/sh: line 0: cd: /home/bhoumis/milvus/: No such file or directory
WARNING - __main__ -  Tried to start Milvus through Docker but this failed. It is likely that there is already an existing Milvus instance running. 

Expected behavior A clear and concise description of what you expected to happen.

status = subprocess.run([f"cd {milvus_dir} && docker-compose up -d"], shell=True)

Additional context Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.

To Reproduce Steps to reproduce the behavior from haystack.utils import launch_milvus launch_milvus()

FAQ Check

System:

  • OS: macOS Monterey v12.6.1
  • GPU/CPU: M1-Pro
  • Haystack version (commit or version number): v1.12.2
  • DocumentStore: MilvusDocumentStore(
  • Reader: NA
  • Retriever: NA

t0r0id avatar Jan 02 '23 12:01 t0r0id