28 lines
634 B
Docker
28 lines
634 B
Docker
FROM python:3.8-slim
|
|
|
|
# 시스템 패키지 업데이트 및 필요한 패키지 설치
|
|
RUN apt-get update && apt-get install -y \
|
|
libglib2.0-0 \
|
|
libsm6 \
|
|
libxext6 \
|
|
libxrender-dev \
|
|
libgomp1 \
|
|
libgl1-mesa-glx \
|
|
libglib2.0-0 \
|
|
wget \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /worker
|
|
|
|
# requirements.txt 먼저 복사하여 도커 캐시 활용
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# 전체 소스 복사
|
|
COPY . .
|
|
|
|
# 워커 실행 스크립트에 실행 권한 부여
|
|
RUN chmod +x worker.py
|
|
|
|
# 기본 명령어
|
|
CMD ["python", "worker.py", "--concurrency", "2"] |