Skip to content

Commit

Permalink
0.03
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Sep 5, 2023
1 parent 75f2c60 commit 79da168
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
test
run.log
docs
.git
.git
data
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ __pycache__/

# C extensions
*.so

data

# Distribution / packaging
.Python
Expand Down
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
FROM python:3.10-slim AS builder
RUN apt update && apt install build-essential -y
RUN apt-get install -y npm
COPY ./requirements.txt .

RUN pip install --upgrade --no-cache-dir pip && pip install --no-cache-dir -r requirements.txt
FROM python:3.10-slim
RUN npm install pm2 -g

COPY ./start.sh .
ENV WORKDIR /app
WORKDIR $WORKDIR

FROM python:3.10-slim
ADD . $WORKDIR
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
ENTRYPOINT ["sh","./start.sh"]
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version: '3.9'
services:
llmbot:
image: sudoskys/llmbot:latest
command: python3 start_sender.py&python3 start_receiver.py
depends_on:
- redis
- rabbitmq
Expand Down
20 changes: 20 additions & 0 deletions pm2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"apps": [
{
"name": "sender",
"script": "python3 start_sender.py",
"instances": 1,
"error_file": "sender.log",
"out_file": "sender.log",
"log_date_format": "YYYY-MM-DD HH-mm-ss"
},
{
"name": "receiver",
"script": "python3 start_receiver.py",
"instances": 1,
"error_file": "receiver.log",
"out_file": "receiver.log",
"log_date_format": "YYYY-MM-DD HH-mm-ss"
}
]
}
2 changes: 2 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python3 start_receiver.py &
python3 start_sender.py

0 comments on commit 79da168

Please sign in to comment.