mirror of
https://github.com/StanGirard/quivr.git
synced 2024-08-16 08:30:28 +03:00
feat: 🎸 cpu (#2065)
increased # Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
This commit is contained in:
parent
7c0887a887
commit
3ac4f02b73
@ -1,105 +1,100 @@
|
|||||||
{
|
{
|
||||||
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr:160",
|
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr:160",
|
||||||
"containerDefinitions": [
|
"containerDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "quivr",
|
||||||
|
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:bada136312ad3497664c3562a36b263d43c89c53",
|
||||||
|
"cpu": "2048",
|
||||||
|
"memory": "4096",
|
||||||
|
"portMappings": [
|
||||||
{
|
{
|
||||||
"name": "quivr",
|
"name": "quivr-5050-tcp",
|
||||||
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:bada136312ad3497664c3562a36b263d43c89c53",
|
"containerPort": 5050,
|
||||||
"cpu": "1024",
|
"hostPort": 5050,
|
||||||
"memory": "2048",
|
"protocol": "tcp",
|
||||||
"portMappings": [
|
"appProtocol": "http"
|
||||||
{
|
|
||||||
"name": "quivr-5050-tcp",
|
|
||||||
"containerPort": 5050,
|
|
||||||
"hostPort": 5050,
|
|
||||||
"protocol": "tcp",
|
|
||||||
"appProtocol": "http"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"essential": true,
|
|
||||||
"command": [
|
|
||||||
"uvicorn",
|
|
||||||
"main:app",
|
|
||||||
"--host",
|
|
||||||
"0.0.0.0",
|
|
||||||
"--port",
|
|
||||||
"5050",
|
|
||||||
"--workers",
|
|
||||||
"6"
|
|
||||||
],
|
|
||||||
"environment": [],
|
|
||||||
"environmentFiles": [
|
|
||||||
{
|
|
||||||
"value": "arn:aws:s3:::quivr-env-variables/production.env",
|
|
||||||
"type": "s3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mountPoints": [],
|
|
||||||
"volumesFrom": [],
|
|
||||||
"logConfiguration": {
|
|
||||||
"logDriver": "awslogs",
|
|
||||||
"options": {
|
|
||||||
"awslogs-create-group": "true",
|
|
||||||
"awslogs-group": "/ecs/quivr",
|
|
||||||
"awslogs-region": "eu-west-3",
|
|
||||||
"awslogs-stream-prefix": "ecs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"family": "quivr",
|
"essential": true,
|
||||||
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"command": [
|
||||||
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"uvicorn",
|
||||||
"networkMode": "awsvpc",
|
"main:app",
|
||||||
"revision": 160,
|
"--host",
|
||||||
"volumes": [],
|
"0.0.0.0",
|
||||||
"status": "ACTIVE",
|
"--port",
|
||||||
"requiresAttributes": [
|
"5050",
|
||||||
|
"--workers",
|
||||||
|
"6"
|
||||||
|
],
|
||||||
|
"environment": [],
|
||||||
|
"environmentFiles": [
|
||||||
{
|
{
|
||||||
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
"value": "arn:aws:s3:::quivr-env-variables/production.env",
|
||||||
},
|
"type": "s3"
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-awslogs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.env-files.s3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-ecr-pull"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.task-eni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"placementConstraints": [],
|
"mountPoints": [],
|
||||||
"compatibilities": [
|
"volumesFrom": [],
|
||||||
"EC2",
|
"logConfiguration": {
|
||||||
"FARGATE"
|
"logDriver": "awslogs",
|
||||||
],
|
"options": {
|
||||||
"requiresCompatibilities": [
|
"awslogs-create-group": "true",
|
||||||
"FARGATE"
|
"awslogs-group": "/ecs/quivr",
|
||||||
],
|
"awslogs-region": "eu-west-3",
|
||||||
"cpu": "1024",
|
"awslogs-stream-prefix": "ecs"
|
||||||
"memory": "2048",
|
}
|
||||||
"runtimePlatform": {
|
}
|
||||||
"cpuArchitecture": "X86_64",
|
}
|
||||||
"operatingSystemFamily": "LINUX"
|
],
|
||||||
|
"family": "quivr",
|
||||||
|
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
|
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
|
"networkMode": "awsvpc",
|
||||||
|
"revision": 160,
|
||||||
|
"volumes": [],
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"requiresAttributes": [
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
||||||
},
|
},
|
||||||
"registeredAt": "2023-07-27T13:27:07.192Z",
|
{
|
||||||
"registeredBy": "arn:aws:iam::253053805092:root",
|
"name": "ecs.capability.execution-role-awslogs"
|
||||||
"tags": []
|
},
|
||||||
}
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.env-files.s3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.execution-role-ecr-pull"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.task-eni"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"placementConstraints": [],
|
||||||
|
"compatibilities": ["EC2", "FARGATE"],
|
||||||
|
"requiresCompatibilities": ["FARGATE"],
|
||||||
|
"cpu": "2048",
|
||||||
|
"memory": "4096",
|
||||||
|
"runtimePlatform": {
|
||||||
|
"cpuArchitecture": "X86_64",
|
||||||
|
"operatingSystemFamily": "LINUX"
|
||||||
|
},
|
||||||
|
"registeredAt": "2023-07-27T13:27:07.192Z",
|
||||||
|
"registeredBy": "arn:aws:iam::253053805092:root",
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
@ -1,106 +1,101 @@
|
|||||||
{
|
{
|
||||||
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr-preview:4",
|
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr-preview:4",
|
||||||
"containerDefinitions": [
|
"containerDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "quivr",
|
||||||
|
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:c0ff0301002fe6d043270b26dabcfda797437afc",
|
||||||
|
"cpu": "2048",
|
||||||
|
"memory": "4096",
|
||||||
|
"portMappings": [
|
||||||
{
|
{
|
||||||
"name": "quivr",
|
"name": "quivr-5050-tcp",
|
||||||
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:c0ff0301002fe6d043270b26dabcfda797437afc",
|
"containerPort": 5050,
|
||||||
"cpu": "1024",
|
"hostPort": 5050,
|
||||||
"memory": "2048",
|
"protocol": "tcp",
|
||||||
"portMappings": [
|
"appProtocol": "http"
|
||||||
{
|
|
||||||
"name": "quivr-5050-tcp",
|
|
||||||
"containerPort": 5050,
|
|
||||||
"hostPort": 5050,
|
|
||||||
"protocol": "tcp",
|
|
||||||
"appProtocol": "http"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"command": [
|
|
||||||
"uvicorn",
|
|
||||||
"main:app",
|
|
||||||
"--host",
|
|
||||||
"0.0.0.0",
|
|
||||||
"--port",
|
|
||||||
"5050",
|
|
||||||
"--workers",
|
|
||||||
"6"
|
|
||||||
],
|
|
||||||
"essential": true,
|
|
||||||
"environment": [],
|
|
||||||
"environmentFiles": [
|
|
||||||
{
|
|
||||||
"value": "arn:aws:s3:::quivr-env-variables/preview.env",
|
|
||||||
"type": "s3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mountPoints": [],
|
|
||||||
"volumesFrom": [],
|
|
||||||
"ulimits": [],
|
|
||||||
"logConfiguration": {
|
|
||||||
"logDriver": "awslogs",
|
|
||||||
"options": {
|
|
||||||
"awslogs-create-group": "true",
|
|
||||||
"awslogs-group": "/ecs/quivr-preview",
|
|
||||||
"awslogs-region": "eu-west-3",
|
|
||||||
"awslogs-stream-prefix": "ecs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"family": "quivr-preview",
|
"command": [
|
||||||
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"uvicorn",
|
||||||
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"main:app",
|
||||||
"networkMode": "awsvpc",
|
"--host",
|
||||||
"revision": 4,
|
"0.0.0.0",
|
||||||
"volumes": [],
|
"--port",
|
||||||
"status": "ACTIVE",
|
"5050",
|
||||||
"requiresAttributes": [
|
"--workers",
|
||||||
|
"6"
|
||||||
|
],
|
||||||
|
"essential": true,
|
||||||
|
"environment": [],
|
||||||
|
"environmentFiles": [
|
||||||
{
|
{
|
||||||
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
"value": "arn:aws:s3:::quivr-env-variables/preview.env",
|
||||||
},
|
"type": "s3"
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-awslogs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.env-files.s3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-ecr-pull"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.task-eni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"placementConstraints": [],
|
"mountPoints": [],
|
||||||
"compatibilities": [
|
"volumesFrom": [],
|
||||||
"EC2",
|
"ulimits": [],
|
||||||
"FARGATE"
|
"logConfiguration": {
|
||||||
],
|
"logDriver": "awslogs",
|
||||||
"requiresCompatibilities": [
|
"options": {
|
||||||
"FARGATE"
|
"awslogs-create-group": "true",
|
||||||
],
|
"awslogs-group": "/ecs/quivr-preview",
|
||||||
"cpu": "1024",
|
"awslogs-region": "eu-west-3",
|
||||||
"memory": "2048",
|
"awslogs-stream-prefix": "ecs"
|
||||||
"runtimePlatform": {
|
}
|
||||||
"cpuArchitecture": "X86_64",
|
}
|
||||||
"operatingSystemFamily": "LINUX"
|
}
|
||||||
|
],
|
||||||
|
"family": "quivr-preview",
|
||||||
|
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
|
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
|
"networkMode": "awsvpc",
|
||||||
|
"revision": 4,
|
||||||
|
"volumes": [],
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"requiresAttributes": [
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
||||||
},
|
},
|
||||||
"registeredAt": "2023-06-29T07:33:39.537Z",
|
{
|
||||||
"registeredBy": "arn:aws:iam::253053805092:root",
|
"name": "ecs.capability.execution-role-awslogs"
|
||||||
"tags": []
|
},
|
||||||
}
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.env-files.s3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.execution-role-ecr-pull"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.task-eni"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"placementConstraints": [],
|
||||||
|
"compatibilities": ["EC2", "FARGATE"],
|
||||||
|
"requiresCompatibilities": ["FARGATE"],
|
||||||
|
"cpu": "2048",
|
||||||
|
"memory": "4096",
|
||||||
|
"runtimePlatform": {
|
||||||
|
"cpuArchitecture": "X86_64",
|
||||||
|
"operatingSystemFamily": "LINUX"
|
||||||
|
},
|
||||||
|
"registeredAt": "2023-06-29T07:33:39.537Z",
|
||||||
|
"registeredBy": "arn:aws:iam::253053805092:root",
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
@ -1,94 +1,82 @@
|
|||||||
{
|
{
|
||||||
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr-preview-chat:1",
|
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr-preview-chat:1",
|
||||||
"containerDefinitions": [
|
"containerDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "quivr-chat",
|
||||||
|
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:600ff1ede02741c66853cc3e4e7f5001aaba3bc2",
|
||||||
|
"cpu": "1024",
|
||||||
|
"memory": "2048",
|
||||||
|
"essential": true,
|
||||||
|
"command": ["celery", "-A", "celery_worker", "worker", "-l", "info"],
|
||||||
|
"environment": [],
|
||||||
|
"environmentFiles": [
|
||||||
{
|
{
|
||||||
"name": "quivr-chat",
|
"value": "arn:aws:s3:::quivr-env-variables/preview.env",
|
||||||
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:600ff1ede02741c66853cc3e4e7f5001aaba3bc2",
|
"type": "s3"
|
||||||
"cpu": "256",
|
|
||||||
"memory": "1024",
|
|
||||||
"essential": true,
|
|
||||||
"command": [
|
|
||||||
"celery",
|
|
||||||
"-A",
|
|
||||||
"celery_worker",
|
|
||||||
"worker",
|
|
||||||
"-l",
|
|
||||||
"info"
|
|
||||||
],
|
|
||||||
"environment": [],
|
|
||||||
"environmentFiles": [
|
|
||||||
{
|
|
||||||
"value": "arn:aws:s3:::quivr-env-variables/preview.env",
|
|
||||||
"type": "s3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mountPoints": [],
|
|
||||||
"volumesFrom": [],
|
|
||||||
"logConfiguration": {
|
|
||||||
"logDriver": "awslogs",
|
|
||||||
"options": {
|
|
||||||
"awslogs-create-group": "true",
|
|
||||||
"awslogs-group": "/ecs/quivr-preview-chat",
|
|
||||||
"awslogs-region": "eu-west-3",
|
|
||||||
"awslogs-stream-prefix": "ecs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"family": "quivr-preview-chat",
|
"mountPoints": [],
|
||||||
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"volumesFrom": [],
|
||||||
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"logConfiguration": {
|
||||||
"networkMode": "awsvpc",
|
"logDriver": "awslogs",
|
||||||
"revision": 1,
|
"options": {
|
||||||
"volumes": [],
|
"awslogs-create-group": "true",
|
||||||
"status": "ACTIVE",
|
"awslogs-group": "/ecs/quivr-preview-chat",
|
||||||
"requiresAttributes": [
|
"awslogs-region": "eu-west-3",
|
||||||
{
|
"awslogs-stream-prefix": "ecs"
|
||||||
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-awslogs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.env-files.s3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-ecr-pull"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.task-eni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
|
||||||
}
|
}
|
||||||
],
|
}
|
||||||
"placementConstraints": [],
|
}
|
||||||
"compatibilities": [
|
],
|
||||||
"EC2",
|
"family": "quivr-preview-chat",
|
||||||
"FARGATE"
|
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
],
|
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
"requiresCompatibilities": [
|
"networkMode": "awsvpc",
|
||||||
"FARGATE"
|
"revision": 1,
|
||||||
],
|
"volumes": [],
|
||||||
"cpu": "256",
|
"status": "ACTIVE",
|
||||||
"memory": "1024",
|
"requiresAttributes": [
|
||||||
"runtimePlatform": {
|
{
|
||||||
"cpuArchitecture": "X86_64",
|
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
||||||
"operatingSystemFamily": "LINUX"
|
|
||||||
},
|
},
|
||||||
"registeredAt": "2023-08-18T09:01:56.187Z",
|
{
|
||||||
"registeredBy": "arn:aws:iam::253053805092:root",
|
"name": "ecs.capability.execution-role-awslogs"
|
||||||
"tags": []
|
},
|
||||||
}
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.env-files.s3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.execution-role-ecr-pull"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.task-eni"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"placementConstraints": [],
|
||||||
|
"compatibilities": ["EC2", "FARGATE"],
|
||||||
|
"requiresCompatibilities": ["FARGATE"],
|
||||||
|
"cpu": "1024",
|
||||||
|
"memory": "2048",
|
||||||
|
"runtimePlatform": {
|
||||||
|
"cpuArchitecture": "X86_64",
|
||||||
|
"operatingSystemFamily": "LINUX"
|
||||||
|
},
|
||||||
|
"registeredAt": "2023-08-18T09:01:56.187Z",
|
||||||
|
"registeredBy": "arn:aws:iam::253053805092:root",
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
@ -1,100 +1,88 @@
|
|||||||
{
|
{
|
||||||
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr-prod-chat:71",
|
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/quivr-prod-chat:71",
|
||||||
"containerDefinitions": [
|
"containerDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "quivr-chat",
|
||||||
|
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:35bd4727c67790d295a474dd81dfbef8469365e8",
|
||||||
|
"cpu": 2048,
|
||||||
|
"memory": 4096,
|
||||||
|
"memoryReservation": 4096,
|
||||||
|
"portMappings": [],
|
||||||
|
"essential": true,
|
||||||
|
"command": ["celery", "-A", "celery_worker", "worker", "-l", "info"],
|
||||||
|
"environment": [],
|
||||||
|
"environmentFiles": [
|
||||||
{
|
{
|
||||||
"name": "quivr-chat",
|
"value": "arn:aws:s3:::quivr-env-variables/production.env",
|
||||||
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr:35bd4727c67790d295a474dd81dfbef8469365e8",
|
"type": "s3"
|
||||||
"cpu": 1024,
|
|
||||||
"memory": 2048,
|
|
||||||
"memoryReservation": 2048,
|
|
||||||
"portMappings": [],
|
|
||||||
"essential": true,
|
|
||||||
"command": [
|
|
||||||
"celery",
|
|
||||||
"-A",
|
|
||||||
"celery_worker",
|
|
||||||
"worker",
|
|
||||||
"-l",
|
|
||||||
"info"
|
|
||||||
],
|
|
||||||
"environment": [],
|
|
||||||
"environmentFiles": [
|
|
||||||
{
|
|
||||||
"value": "arn:aws:s3:::quivr-env-variables/production.env",
|
|
||||||
"type": "s3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mountPoints": [],
|
|
||||||
"volumesFrom": [],
|
|
||||||
"logConfiguration": {
|
|
||||||
"logDriver": "awslogs",
|
|
||||||
"options": {
|
|
||||||
"awslogs-create-group": "true",
|
|
||||||
"awslogs-group": "/ecs/quivr-production-chat",
|
|
||||||
"awslogs-region": "eu-west-3",
|
|
||||||
"awslogs-stream-prefix": "ecs"
|
|
||||||
},
|
|
||||||
"secretOptions": []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"family": "quivr-prod-chat",
|
"mountPoints": [],
|
||||||
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"volumesFrom": [],
|
||||||
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"logConfiguration": {
|
||||||
"networkMode": "awsvpc",
|
"logDriver": "awslogs",
|
||||||
"revision": 71,
|
"options": {
|
||||||
"volumes": [],
|
"awslogs-create-group": "true",
|
||||||
"status": "ACTIVE",
|
"awslogs-group": "/ecs/quivr-production-chat",
|
||||||
"requiresAttributes": [
|
"awslogs-region": "eu-west-3",
|
||||||
{
|
"awslogs-stream-prefix": "ecs"
|
||||||
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
|
||||||
},
|
},
|
||||||
{
|
"secretOptions": []
|
||||||
"name": "ecs.capability.execution-role-awslogs"
|
}
|
||||||
},
|
}
|
||||||
{
|
],
|
||||||
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
"family": "quivr-prod-chat",
|
||||||
},
|
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
{
|
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
"networkMode": "awsvpc",
|
||||||
},
|
"revision": 71,
|
||||||
{
|
"volumes": [],
|
||||||
"name": "ecs.capability.env-files.s3"
|
"status": "ACTIVE",
|
||||||
},
|
"requiresAttributes": [
|
||||||
{
|
{
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.21"
|
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-ecr-pull"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.task-eni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"placementConstraints": [],
|
|
||||||
"compatibilities": [
|
|
||||||
"EC2",
|
|
||||||
"FARGATE"
|
|
||||||
],
|
|
||||||
"requiresCompatibilities": [
|
|
||||||
"FARGATE"
|
|
||||||
],
|
|
||||||
"cpu": "1024",
|
|
||||||
"memory": "2048",
|
|
||||||
"runtimePlatform": {
|
|
||||||
"cpuArchitecture": "X86_64",
|
|
||||||
"operatingSystemFamily": "LINUX"
|
|
||||||
},
|
},
|
||||||
"registeredAt": "2023-12-03T15:54:51.921Z",
|
{
|
||||||
"registeredBy": "arn:aws:iam::253053805092:root",
|
"name": "ecs.capability.execution-role-awslogs"
|
||||||
"tags": []
|
},
|
||||||
}
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.env-files.s3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.21"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.execution-role-ecr-pull"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.task-eni"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"placementConstraints": [],
|
||||||
|
"compatibilities": ["EC2", "FARGATE"],
|
||||||
|
"requiresCompatibilities": ["FARGATE"],
|
||||||
|
"cpu": "2048",
|
||||||
|
"memory": "4096",
|
||||||
|
"runtimePlatform": {
|
||||||
|
"cpuArchitecture": "X86_64",
|
||||||
|
"operatingSystemFamily": "LINUX"
|
||||||
|
},
|
||||||
|
"registeredAt": "2023-12-03T15:54:51.921Z",
|
||||||
|
"registeredBy": "arn:aws:iam::253053805092:root",
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
@ -1,97 +1,92 @@
|
|||||||
{
|
{
|
||||||
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/Strapi:1",
|
"taskDefinitionArn": "arn:aws:ecs:eu-west-3:253053805092:task-definition/Strapi:1",
|
||||||
"containerDefinitions": [
|
"containerDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "strapi",
|
||||||
|
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr-strapi",
|
||||||
|
"cpu": 1024,
|
||||||
|
"memory": 2048,
|
||||||
|
"portMappings": [
|
||||||
{
|
{
|
||||||
"name": "strapi",
|
"name": "strapi-1337-tcp",
|
||||||
"image": "253053805092.dkr.ecr.eu-west-3.amazonaws.com/quivr-strapi",
|
"containerPort": 1337,
|
||||||
"cpu": 512,
|
"hostPort": 1337,
|
||||||
"memory": 2048,
|
"protocol": "tcp",
|
||||||
"portMappings": [
|
"appProtocol": "http"
|
||||||
{
|
|
||||||
"name": "strapi-1337-tcp",
|
|
||||||
"containerPort": 1337,
|
|
||||||
"hostPort": 1337,
|
|
||||||
"protocol": "tcp",
|
|
||||||
"appProtocol": "http"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"essential": true,
|
|
||||||
"environment": [],
|
|
||||||
"environmentFiles": [
|
|
||||||
{
|
|
||||||
"value": "arn:aws:s3:::quivr-env-variables/strapi.env",
|
|
||||||
"type": "s3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mountPoints": [],
|
|
||||||
"volumesFrom": [],
|
|
||||||
"ulimits": [],
|
|
||||||
"logConfiguration": {
|
|
||||||
"logDriver": "awslogs",
|
|
||||||
"options": {
|
|
||||||
"awslogs-create-group": "true",
|
|
||||||
"awslogs-group": "/ecs/Strapi",
|
|
||||||
"awslogs-region": "eu-west-3",
|
|
||||||
"awslogs-stream-prefix": "ecs"
|
|
||||||
},
|
|
||||||
"secretOptions": []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"family": "Strapi",
|
"essential": true,
|
||||||
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"environment": [],
|
||||||
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
"environmentFiles": [
|
||||||
"networkMode": "awsvpc",
|
|
||||||
"revision": 1,
|
|
||||||
"volumes": [],
|
|
||||||
"status": "ACTIVE",
|
|
||||||
"requiresAttributes": [
|
|
||||||
{
|
{
|
||||||
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
"value": "arn:aws:s3:::quivr-env-variables/strapi.env",
|
||||||
},
|
"type": "s3"
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-awslogs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.env-files.s3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.execution-role-ecr-pull"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ecs.capability.task-eni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"placementConstraints": [],
|
"mountPoints": [],
|
||||||
"compatibilities": [
|
"volumesFrom": [],
|
||||||
"EC2",
|
"ulimits": [],
|
||||||
"FARGATE"
|
"logConfiguration": {
|
||||||
],
|
"logDriver": "awslogs",
|
||||||
"requiresCompatibilities": [
|
"options": {
|
||||||
"FARGATE"
|
"awslogs-create-group": "true",
|
||||||
],
|
"awslogs-group": "/ecs/Strapi",
|
||||||
"cpu": "1024",
|
"awslogs-region": "eu-west-3",
|
||||||
"memory": "2048",
|
"awslogs-stream-prefix": "ecs"
|
||||||
"runtimePlatform": {
|
},
|
||||||
"cpuArchitecture": "X86_64",
|
"secretOptions": []
|
||||||
"operatingSystemFamily": "LINUX"
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"family": "Strapi",
|
||||||
|
"taskRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
|
"executionRoleArn": "arn:aws:iam::253053805092:role/ecsTaskExecutionRole",
|
||||||
|
"networkMode": "awsvpc",
|
||||||
|
"revision": 1,
|
||||||
|
"volumes": [],
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"requiresAttributes": [
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
|
||||||
},
|
},
|
||||||
"registeredAt": "2023-09-21T07:48:32.167Z",
|
{
|
||||||
"registeredBy": "arn:aws:iam::253053805092:root",
|
"name": "ecs.capability.execution-role-awslogs"
|
||||||
"tags": []
|
},
|
||||||
}
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.ecr-auth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.env-files.s3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.task-iam-role"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.execution-role-ecr-pull"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ecs.capability.task-eni"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"placementConstraints": [],
|
||||||
|
"compatibilities": ["EC2", "FARGATE"],
|
||||||
|
"requiresCompatibilities": ["FARGATE"],
|
||||||
|
"cpu": "1024",
|
||||||
|
"memory": "2048",
|
||||||
|
"runtimePlatform": {
|
||||||
|
"cpuArchitecture": "X86_64",
|
||||||
|
"operatingSystemFamily": "LINUX"
|
||||||
|
},
|
||||||
|
"registeredAt": "2023-09-21T07:48:32.167Z",
|
||||||
|
"registeredBy": "arn:aws:iam::253053805092:root",
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
@ -71,7 +71,6 @@ class UserUsage(UserIdentity):
|
|||||||
current_requests_count = self.supabase_db.get_user_requests_count_for_month(
|
current_requests_count = self.supabase_db.get_user_requests_count_for_month(
|
||||||
self.id, date
|
self.id, date
|
||||||
)
|
)
|
||||||
logger.info("🔥🔥🔥🔥🔥🔥🔥🔥")
|
|
||||||
logger.info(current_requests_count)
|
logger.info(current_requests_count)
|
||||||
if current_requests_count == 0:
|
if current_requests_count == 0:
|
||||||
logger.info("Request count is 0, creating new record")
|
logger.info("Request count is 0, creating new record")
|
||||||
|
@ -36,11 +36,6 @@ def check_user_requests_limit(user: UserIdentity, model: str):
|
|||||||
models_price = userDailyUsage.get_model_settings()
|
models_price = userDailyUsage.get_model_settings()
|
||||||
user_choosen_model_price = 1000
|
user_choosen_model_price = 1000
|
||||||
|
|
||||||
# Log all info
|
|
||||||
logger.info(
|
|
||||||
f"User {user.id} with email {user.email} has {monthly_chat_credit} monthly chat credit and has used {daily_user_count} requests today."
|
|
||||||
)
|
|
||||||
logger.info("🔥🔥")
|
|
||||||
for model_setting in models_price:
|
for model_setting in models_price:
|
||||||
if model_setting["name"] == model:
|
if model_setting["name"] == model:
|
||||||
user_choosen_model_price = model_setting["price"]
|
user_choosen_model_price = model_setting["price"]
|
||||||
|
@ -11,7 +11,6 @@ def list_files_from_storage(path):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
response = supabase_client.storage.from_("quivr").list(path)
|
response = supabase_client.storage.from_("quivr").list(path)
|
||||||
logger.info("RESPONSE", response)
|
|
||||||
return response
|
return response
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
|
@ -37,7 +37,6 @@ class CustomSupabaseVectorStore(SupabaseVectorStore):
|
|||||||
) -> [dict]:
|
) -> [dict]:
|
||||||
vectors = self._embedding.embed_documents([query])
|
vectors = self._embedding.embed_documents([query])
|
||||||
query_embedding = vectors[0]
|
query_embedding = vectors[0]
|
||||||
logger.info("🤯🤯")
|
|
||||||
|
|
||||||
res = self._client.rpc(
|
res = self._client.rpc(
|
||||||
table,
|
table,
|
||||||
|
Loading…
Reference in New Issue
Block a user