lion-devs / otomati-app

Otomati APP help communicate with AI models in a more human-like way.
Apache License 2.0
1 stars 1 forks source link

[BUG]: Upload from Google Drive in "RAG Google Drive page" in docker seems not working #8

Open JustinHung0407 opened 5 days ago

JustinHung0407 commented 5 days ago

Description of the bug

CleanShot_RAG_Google_Drive_Arc_2024-07-02 at 17 48 08@2x

Steps To Reproduce

  1. Build Docker Image:

    • Open a terminal and navigate to your project directory.
    • Build the Docker image with the following command:
      docker build \
       --platform=linux/amd64 \
       --progress=plain \
       -t otomati-app:latest \
       -f Dockerfile .
  2. Run Docker Container:

    • Once the image is built, run the Docker container using the following command:
      docker run -it -d \
       --name otomati-app \
       --platform=linux/amd64 \
       -p 8501:8501 \
       -p 8080:8080 \
       -v "$(pwd)/otomati_app/credentials.json:/app/otomati_app/credentials.json" \
       otomati-app:latest \
       /bin/sh
  3. Access the Application:

    • Open a web browser and navigate to http://localhost:8501/RAG_Google_Drive.
  4. Observe the Error:

    • You should see the following error message:
      Error: could not locate runnable browser
    • The error traceback indicates that the issue occurs when the application tries to authenticate with Google:
      File "/app/otimati_app/pages/2_RAG_Google_Drive.py", line 225, in <module> main()
      File "/app/otimati_app/pages/2_RAG_Google_Drive.py", line 176, in main creds = authenticate_with_google()
      File "/app/otimati_app/pages/2_RAG_Google_Drive.py", line 52, in authenticate_with_google creds = flow.run_local_server()

Expected Result:

Actual Result:

Additional Information

JustinHung0407 commented 5 days ago

This issue is caused by the fact that the Docker container does not have a graphical environment to run a browser for Google authentication. @mtch3n Please check this issue.