Files
stock_chart_site/backend/Dockerfile
tkrmagid e08f3b0765 fix(backend): Dockerfile editable install 제거 + PYTHONPATH
기존 `pip install -e .` 두 줄은 두 가지 이유로 실패:
1. `app/` 가 COPY 되기 전 단계라 setuptools packages.find 결과가
   비어 editable 빌드가 무의미.
2. Ubuntu 22.04 의 기본 pip 가 PEP 660 build_editable hook 을
   요구하지만, build isolation 환경의 setuptools 가 노출 안 함
   ("build backend is missing the 'build_editable' hook").

수정:
- editable install 자체를 제거. 런타임은 PYTHONPATH=/app 으로
  `app.*` import 가 동작하므로 프로젝트를 wheel 로 설치할 필요 없음.
- 의존성은 tomllib 로 pyproject.toml 에서 직접 추출해 단일 `pip
  install -r` 로 설치. ML 휠 (chronos/lgbm/transformers ...) 레이어
  캐싱이 pyproject.toml 단위로 유지됨 → app 코드 변경시 재빌드 회피.
- COPY app ./app 은 deps 설치 뒤로 유지 (캐시 분리).
2026-05-20 23:42:58 +09:00

1.8 KiB