Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
v2.3.40
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Feb 19, 2024
1 parent baa3c7b commit 11290f3
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Pipfile.lock
.env
.envrc

# ignore storage dir
storage

# ignore virtualenvs
.venv
venv*
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN pip install -r requirements.txt
# Copy project files
COPY . .

RUN mkdir "storage"

COPY scripts /scripts
ENTRYPOINT ["/scripts/entrypoint.sh"]
CMD ["chill"]
1 change: 1 addition & 0 deletions arxiv_ai/ls/discuss.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def get_discussion_assistant(
"Remember: DO NOT SEND AN EMAIL TO THE USER WITHOUT THEM PROVIDING THEIR EMAIL ADDRESS",
"Make sure your email body is formatted using HTML",
"Remind the user to check their spam folder if they do not receive the email",
"When you use `get_document_contents` tool, get at least 5000 characters so you get the first few pages.",
]

return Assistant(
Expand Down
14 changes: 13 additions & 1 deletion db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ docker exec -it ai-api alembic -c db/alembic.ini upgrade head
```bash
ECS_CLUSTER=ai-cookbook-prd-cluster
TASK_ARN=$(aws ecs list-tasks --cluster ai-cookbook-prd-cluster --query "taskArns[0]" --output text)
CONTAINER_NAME=ai-api-prd
CONTAINER_NAME=api-ai-cookbook

aws ecs execute-command --cluster $ECS_CLUSTER \
--task $TASK_ARN \
Expand All @@ -62,3 +62,15 @@ alembic init migrations
- set `script_location = db/migrations`
- uncomment `black` hook in `[post_write_hooks]`
- Update `migrations/env.py` file following [this link](https://alembic.sqlalchemy.org/en/latest/autogenerate.html)

```bash
ECS_CLUSTER=ai-cookbook-prd
TASK_ARN=$(aws ecs list-tasks --cluster $ECS_CLUSTER --query "taskArns[0]" --output text)
CONTAINER_NAME=api-ai-cookbook

aws ecs execute-command --cluster $ECS_CLUSTER \
--task $TASK_ARN \
--container $CONTAINER_NAME \
--interactive \
--command "zsh"
```
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dependencies = [
"wikipedia",
"discord.py",
"resend",
"gunicorn",
# Type checking
"mypy",
# Testing
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fonttools==4.47.2
frozenlist==1.4.1
gitdb==4.0.11
gitpython==3.1.41
gunicorn==21.2.0
h11==0.14.0
httpcore==1.0.2
httpx==0.26.0
Expand Down
11 changes: 6 additions & 5 deletions workspace/prd_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
port_number=8501,
ecs_task_cpu="2048",
ecs_task_memory="4096",
ecs_service_count=2,
ecs_service_count=1,
ecs_cluster=prd_ecs_cluster,
aws_secrets=[prd_secret],
subnets=ws_settings.subnet_ids,
Expand Down Expand Up @@ -259,7 +259,7 @@
port_number=8501,
ecs_task_cpu="4096",
ecs_task_memory="8192",
ecs_service_count=3,
ecs_service_count=1,
ecs_cluster=prd_ecs_cluster,
aws_secrets=[prd_secret],
subnets=ws_settings.subnet_ids,
Expand Down Expand Up @@ -289,7 +289,7 @@
port_number=8501,
ecs_task_cpu="2048",
ecs_task_memory="4096",
ecs_service_count=3,
ecs_service_count=1,
ecs_cluster=prd_ecs_cluster,
aws_secrets=[prd_secret],
subnets=ws_settings.subnet_ids,
Expand All @@ -315,10 +315,11 @@
enabled=ws_settings.prd_api_enabled,
group="app",
image=prd_image,
# command="gunicorn -w 4 -k uvicorn.workers.UvicornWorker api.main:app",
command="uvicorn api.main:app",
port_number=8000,
ecs_task_cpu="2048",
ecs_task_memory="4096",
ecs_task_cpu="1024",
ecs_task_memory="2048",
ecs_service_count=1,
ecs_cluster=prd_ecs_cluster,
aws_secrets=[prd_secret],
Expand Down

0 comments on commit 11290f3

Please sign in to comment.