Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix celery timeout error and package version upgrade #4

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
FROM pytorch/pytorch:1.12.0-cuda11.3-cudnn8-devel
FROM nvidia/cuda:11.6.1-cudnn8-devel-ubuntu20.04

# set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt remove python-pip python3-pip \
&& apt-get install --no-install-recommends -y \
build-essential \
ca-certificates \
curl \
g++ \
python3.8 \
python3.8-dev \
python3.8-distutils \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& curl -O https://bootstrap.pypa.io/get-pip.py \
&& python3.8 get-pip.py \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 \
&& update-alternatives --install /usr/local/bin/pip pip /usr/local/bin/pip3.8 1

WORKDIR /app
COPY requirements.txt requirements.txt
COPY ./requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

COPY ./worker/ /app/

CMD ["celery", "-A", "worker", "worker", "--loglevel=info", "--pool=solo"]
CMD ["celery", "-A", "worker", "worker", "--loglevel=info", "--pool=solo", "--concurrency=1", "--without-heartbeat"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worker 커맨드 아래 링크와 싱크 맞추는건 어떤가요?
https://github.com/ainize-team/TTI-Worker/blob/develop/start.sh

10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--find-links https://download.pytorch.org/whl/torch_stable.html
accelerate==0.10.0
--extra-index-url https://download.pytorch.org/whl/cu116
accelerate==0.14.0
celery==5.2.7
loguru==0.6.0
pydantic==1.9.1
transformers==4.20.1
pydantic==1.10.2
transformers==4.24.0
redis==4.3.4
torch==1.12.0+cu113
torch==1.13.0
1 change: 1 addition & 0 deletions worker/configs/celery_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
worker_prefetch_multiplier = 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

task_queues = [Queue(name="llm")]
task_ignore_result = True
broker_connection_timeout = 360