28 lines
753 B
Docker
28 lines
753 B
Docker
FROM paddlepaddle/paddle:3.1.0-gpu-cuda11.8-cudnn8.9
|
|
|
|
# 1. 필수 apt 패키지 설치
|
|
RUN apt-get update && \
|
|
apt-get install -y \
|
|
poppler-utils \
|
|
tesseract-ocr \
|
|
tesseract-ocr-kor \
|
|
libgl1 \
|
|
curl \
|
|
tree \
|
|
git \
|
|
build-essential && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# 3. Python 패키지 설치 (이미 설치된 것과 중복 주의)
|
|
COPY requirements.txt .
|
|
RUN pip install --upgrade pip && \
|
|
pip install --no-cache-dir -r requirements.txt && \
|
|
pip install --no-cache-dir paddleocr
|
|
|
|
# 4. 작업 디렉토리 및 소스 복사
|
|
WORKDIR /workspace
|
|
COPY . .
|
|
|
|
# 5. 실행 명령
|
|
CMD ["sh", "-c", "uvicorn api:app --workers 2 --host 0.0.0.0 --port ${PORT:-8892}"]
|