deepset-ai / haystack

:mag: LLM orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
14.55k stars 1.71k forks source link

Error whule building the UI #2544

Closed Yafaa closed 2 years ago

Yafaa commented 2 years ago

Describe the bug So I am trying to test the ui provided by haystack so I built the docker image and when I run it it shows the The eval file was not found error

Error message SystemExit: The eval file was not found under /home/user/ui/eval_labels_example.csv. Please check the README (https://github.com/deepset-ai/haystack/tree/master/ui/README.md) for more information.

Traceback:

File "/usr/local/lib/python3.7/site-packages/streamlit/scriptrunner/script_runner.py", line 475, in _run_script exec(code, module.dict) File "/home/user/ui/webapp.py", line 280, in main() File "/home/user/ui/webapp.py", line 142, in main f"The eval file was not found under {EVAL_LABELS}. Please check the README (https://github.com/deepset-ai/haystack/tree/master/ui/README.md) for more information."

Expected behavior it should render the ui without error

To Reproduce Just build the image from the docker file (ui folder) I have used docker under a windows machine

ZanSara commented 2 years ago

@Yafaa I suspect you forgot to pass the EVAL_FILE environment variable to the container, see https://github.com/deepset-ai/haystack/blob/master/docker-compose.yml. If this doesn't help, can you share the commands you're using?

Yafaa commented 2 years ago

Yes it may be, any idea how to add it only to the Docker file ? because I am only using the docker file not the compose part to build the image

ZanSara commented 2 years ago

You can use the -e flag of docker run:

> docker run --help

Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Run a command in a new container

Options:
      ...
  -e, --env list                       Set environment variables
     ...

See the docs as well: https://docs.docker.com/engine/reference/run/#env-environment-variables

Yafaa commented 2 years ago

Okay thanks a lot ,that's works in local but I need to upload this image to aws and run it from ECS so it will just run the command ,I need to find a solution for this environment variable, any idea ?

ZanSara commented 2 years ago

Please modify the Dockerfile to include the environment variable. See the Docker documentation: https://docs.docker.com/engine/reference/builder/#env

By the way, given that the original issue is solved, I'll close this thread for now :slightly_smiling_face: You can find all information on how to build and run Docker images on their documentation or on Stackoverflow. Of course if you face other bugs please reach out again.