Spaces:
Sleeping
Sleeping
김민경 commited on
Commit ·
96a8963
1
Parent(s): da4894b
fix: Dockerfile 빌드 순서 수정 + pyproject.toml 빌드 설정 추가
Browse files- COPY . . 를 pip install 전으로 이동 (소스코드 없이 설치 시도하던 문제 해결)
- pip install -e . → pip install . 변경 (Docker에서 editable 불필요)
- HF_HOME/SENTENCE_TRANSFORMERS_HOME 환경변수 설정 (모델 캐시 위치 명시)
- [build-system] 테이블 추가 (setuptools 빌드 백엔드 명시)
- [tool.setuptools.packages.find] 추가 (app 패키지 탐색 범위 지정)
Made-with: Cursor
- Dockerfile +4 -4
- pyproject.toml +7 -0
Dockerfile
CHANGED
|
@@ -6,12 +6,12 @@ RUN apt-get update && \
|
|
| 6 |
apt-get install -y --no-install-recommends build-essential && \
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
-
COPY pyproject.toml .
|
| 10 |
-
RUN pip install --no-cache-dir -e .
|
| 11 |
-
|
| 12 |
COPY . .
|
|
|
|
| 13 |
|
| 14 |
-
ENV EMBEDDING_MODEL=intfloat/multilingual-e5-large
|
|
|
|
|
|
|
| 15 |
RUN python scripts/init_vectordb.py
|
| 16 |
|
| 17 |
ENV API_PORT=7860
|
|
|
|
| 6 |
apt-get install -y --no-install-recommends build-essential && \
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
|
|
|
|
|
|
| 9 |
COPY . .
|
| 10 |
+
RUN pip install --no-cache-dir .
|
| 11 |
|
| 12 |
+
ENV EMBEDDING_MODEL=intfloat/multilingual-e5-large \
|
| 13 |
+
HF_HOME=/app/.hf_cache \
|
| 14 |
+
SENTENCE_TRANSFORMERS_HOME=/app/.hf_cache/sentence_transformers
|
| 15 |
RUN python scripts/init_vectordb.py
|
| 16 |
|
| 17 |
ENV API_PORT=7860
|
pyproject.toml
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
[project]
|
| 2 |
name = "insurance-chatbot"
|
| 3 |
version = "2.0.0"
|
|
@@ -34,6 +38,9 @@ dev = [
|
|
| 34 |
serve = "run:main"
|
| 35 |
mcp = "run_mcp:main"
|
| 36 |
|
|
|
|
|
|
|
|
|
|
| 37 |
[tool.ruff]
|
| 38 |
target-version = "py311"
|
| 39 |
line-length = 100
|
|
|
|
| 1 |
+
[build-system]
|
| 2 |
+
requires = ["setuptools>=68.0", "wheel"]
|
| 3 |
+
build-backend = "setuptools.build_meta"
|
| 4 |
+
|
| 5 |
[project]
|
| 6 |
name = "insurance-chatbot"
|
| 7 |
version = "2.0.0"
|
|
|
|
| 38 |
serve = "run:main"
|
| 39 |
mcp = "run_mcp:main"
|
| 40 |
|
| 41 |
+
[tool.setuptools.packages.find]
|
| 42 |
+
include = ["app*"]
|
| 43 |
+
|
| 44 |
[tool.ruff]
|
| 45 |
target-version = "py311"
|
| 46 |
line-length = 100
|