31 lines
852 B
Docker
31 lines
852 B
Docker
|
|
|
|
|
|
|
|
#FROM python:3.10-slim
|
|
FROM python:3.10-slim
|
|
|
|
WORKDIR /app
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends libgl1 libglib2.0-0 \
|
|
libgl1-mesa-glx \
|
|
libglib2.0-0 \
|
|
libgl1-mesa-dri \
|
|
libsm6 libxext6 libxrender1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY requirements_worker.txt .
|
|
COPY packages_worker/fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl .
|
|
|
|
RUN pip install --no-cache-dir -r requirements_worker.txt
|
|
RUN pip install --no-cache-dir fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl
|
|
|
|
COPY worker /app/worker
|
|
# 폰트/모델 등 리소스
|
|
COPY fonts /app/fonts
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV TEMP_STORAGE=/app/temp_files
|
|
RUN mkdir -p $TEMP_STORAGE
|
|
|
|
CMD ["celery", "-A", "worker.worker_translate_task_refactored.celery_app", "worker", "-l", "info", "--concurrency=4"]
|