[!Important]
The following test CANNOT BE DONE if you are not an authorized member of cvpaper challenge who does not have access to the Amazon Secret Manager of our organization.
Create your own environments/.env referring environments/.env.sample and specify the secret environment variables
You might be able to get AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY by asking for them to @gatheluck who manages the AWS account I used for the Crux application
You can get AWS_DEFAULT_REGION and DYNAMODB_TABLE_NAME from here
You can get QDRANT_CLOUD_URL and QDRANT_API_KEY from here. If you want to use the different Qdrant Cloud cluster from one I prepared and try to test vector registration
Due to modifications to the Dockerfile, it is necessary to restart the container once.
Remove the existing containers
# Move to the directory that has `docker-compose.yaml`
~/Crux$ cd environments/cpu
# Remove the existing docker containers
~/Crux/environments/cpu$ docker compose down
Boot up containers without using cache
# Re-build docker images without using cache
~/Crux/environments/cpu$ docker compose build --no-cache
# Boot up docker containers
~/Crux/environments/cpu$ docker compose up -d
Run the backend logic on the local server
Update Python libraries inside the backend container
# Update the poetry.lock and install the updated Python libraries
~/crux-backend$ poetry update
Run the backend server
~/crux-backend$ poetry run make run-backend
poetry run gunicorn 'src.main:app' -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 -t 6000 --log-level info
[2024-05-19 02:21:02 +0000] [3866] [INFO] Starting gunicorn 21.2.0
[2024-05-19 02:21:02 +0000] [3866] [INFO] Listening at: http://0.0.0.0:8000 (3866)
[2024-05-19 02:21:02 +0000] [3866] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2024-05-19 02:21:02 +0000] [3882] [INFO] Booting worker with pid: 3882
[2024-05-19 02:21:03 +0000] [3882] [INFO] Started server process [3882]
[2024-05-19 02:21:03 +0000] [3882] [INFO] Waiting for application startup.
[2024-05-19 02:21:03 +0000] [3882] [INFO] Application startup complete.
Run the frontend UI on the local server
Install node.js libraries inside the frontend container
# Move to the frontend directory
~/crux-frontend$ cd crux
# Install node.js dependencies
~/crux-frontend$ npm install
Run the frontend server
# Run the server
~/crux-frontend/crux$ npm run dev
> crux@0.1.0 dev
> next dev
▲ Next.js 14.1.4
- Local: http://localhost:3000
- Environments: .env.development, .env
✓ Ready in 2.9s
○ Compiling / ...
✓ Compiled / in 4.7s (3100 modules)
✓ Compiled in 1676ms (1540 modules)
Issue URL
N/A
Change overview
boto3
How to test
1. Prerequisite
Prepare the API keys for OpenAI API
Create your own
environments/.env
referringenvironments/.env.sample
and specify the secret environment variablesAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
by asking for them to @gatheluck who manages the AWS account I used for the Crux applicationAWS_DEFAULT_REGION
andDYNAMODB_TABLE_NAME
from hereQDRANT_CLOUD_URL
andQDRANT_API_KEY
from here. If you want to use the different Qdrant Cloud cluster from one I prepared and try to test vector registration2. Local Test
Due to modifications to the Dockerfile, it is necessary to restart the container once.
Remove the existing containers
Boot up containers without using cache
Run the backend logic on the local server
Update Python libraries inside the backend container
Run the backend server
Run the frontend UI on the local server
Install node.js libraries inside the frontend container
Run the frontend server
Make sure the Crux application is displayed correctly on http://localhost:3000
Test the application
Log in to the application from the "Login" button.
Please use the email and password registered here![image](https://github.com/cvpaperchallenge/Crux/assets/61688218/0f2fb904-d80f-47db-b7fc-0084d8ede5b8)
You will be redirected to the following page after login.![image](https://github.com/cvpaperchallenge/Crux/assets/61688218/d433a38e-2f1c-4e24-9cfb-f174c3722772)
You can create/delete/list chats on that page.
Note for reviewers