cvpaperchallenge / Crux

Crux is a suite of LLM-empowered summarization and retrieval services for academic activity. Crux is developed by XCCV group of cvpaper.challenge.
MIT License
14 stars 2 forks source link

#4/enhancement/implement docker compose yaml #13

Closed YoshikiKubotani closed 1 year ago

YoshikiKubotani commented 1 year ago

Issue URL

4

Change overview

How to test

  1. Run Crux application
% cd environments/cpu
% sudo docker compose up -d

--

# Under the frontend container
$ poetry install
$ make run-frontend

poetry run streamlit run src/test_streamlit.py --server.port 8501

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501
  Network URL: http://172.22.0.2:8501

--

# Under the backend container
$ poetry install
$ make run-backend

poetry run gunicorn 'src.app:main' -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 -t 60 --log-level info 
[2023-04-29 13:50:28 +0000] [1952] [INFO] Starting gunicorn 20.1.0
[2023-04-29 13:50:28 +0000] [1952] [INFO] Listening at: http://0.0.0.0:8000 (1952)
[2023-04-29 13:50:28 +0000] [1952] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2023-04-29 13:50:28 +0000] [1971] [INFO] Booting worker with pid: 1971
[2023-04-29 13:50:28 +0000] [1971] [WARNING] ASGI app factory detected. Using it, but please consider setting the --factory flag explicitly.
[2023-04-29 13:50:28 +0000] [1971] [INFO] Started server process [1971]
[2023-04-29 13:50:28 +0000] [1971] [INFO] Waiting for application startup.
[2023-04-29 13:50:28 +0000] [1971] [INFO] Application startup complete.
  1. To check if the frontend works fine, visit http://localhost:8501. You will see the page like the following. スクリーンショット 2023-04-29 231533

  2. To check if the backend works fine, visit http://localhost:8000/docs. You will see the page like the following. Screenshot from 2023-04-27 01-27-32 You can also try health endpoint by pushing "Try it out" button and "Execute" button. Screenshot from 2023-04-27 01-29-00

  3. After test please don't forget to stop or down containers.

% cd environments/cpu
% sudo docker compose stop

Note for reviewers

NA