Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UFZ7JWdwCaQAwNYJErL8pP
37 lines
1.3 KiB
Docker
37 lines
1.3 KiB
Docker
# 평가환경 재현: Ubuntu 20.04 + Python 3.10 (연구개발계획서 명시 환경)
|
|
# Python 3.10은 20.04 저장소에 없어 소스 빌드한다 (PPA는 컨테이너 dbus 제약으로 실패,
|
|
# 소스 빌드는 아키텍처(amd64/arm64) 무관하게 동작).
|
|
FROM ubuntu:20.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
build-essential wget ca-certificates \
|
|
libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
|
|
libsqlite3-dev libffi-dev liblzma-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG PY_VER=3.10.14
|
|
RUN wget -q "https://www.python.org/ftp/python/${PY_VER}/Python-${PY_VER}.tgz" \
|
|
&& tar xzf "Python-${PY_VER}.tgz" \
|
|
&& cd "Python-${PY_VER}" \
|
|
&& ./configure --with-ensurepip=install > /dev/null \
|
|
&& make -j"$(nproc)" > /dev/null \
|
|
&& make altinstall > /dev/null \
|
|
&& cd .. && rm -rf "Python-${PY_VER}" "Python-${PY_VER}.tgz"
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN python3.10 -m pip install --no-cache-dir -r requirements.txt
|
|
|
|
# 계획서 평가환경(Ubuntu 20.04 · Python 3.10 · Pytorch) 준수 — 시나리오 분류(⑨) 모델 실행용
|
|
RUN python3.10 -m pip install --no-cache-dir torch==2.4.1 --index-url https://download.pytorch.org/whl/cpu
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 53117
|
|
|
|
CMD ["python3.10", "web_main.py"]
|