Spaces:
Sleeping
Sleeping
Sync from GitHub Actions
Browse files- Dockerfile +3 -0
- main.py +6 -0
Dockerfile
CHANGED
|
@@ -15,6 +15,9 @@ RUN apt-get update && apt-get install -y \
|
|
| 15 |
&& apt-get clean \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
# ์์
๋๋ ํ ๋ฆฌ
|
| 19 |
WORKDIR /app
|
| 20 |
|
|
|
|
| 15 |
&& apt-get clean \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
+
# Python ๋ก๊ทธ ์ฆ์ flush (Docker stdout ๋ธ๋ก ๋ฒํผ๋ง ๋ฐฉ์ง โ HF ๋ก๊ทธ ์ค์๊ฐ ํ์ธ)
|
| 19 |
+
ENV PYTHONUNBUFFERED=1
|
| 20 |
+
|
| 21 |
# ์์
๋๋ ํ ๋ฆฌ
|
| 22 |
WORKDIR /app
|
| 23 |
|
main.py
CHANGED
|
@@ -8,6 +8,8 @@ import os
|
|
| 8 |
import sys
|
| 9 |
from contextlib import asynccontextmanager
|
| 10 |
|
|
|
|
|
|
|
| 11 |
# macOS Apple Silicon์์ PyTorch์ LightGBM์ด ์๋ก ๋ค๋ฅธ OpenMP ๋ฐํ์(libiomp/libomp)์
|
| 12 |
# ๋์์ ์ด๊ธฐํํ ๋ ํ๋ก์ธ์ค๊ฐ ์ถฉ๋ํ๋ค.
|
| 13 |
# ML ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ํฌํธ ์ ์ ํ๊ฒฝ๋ณ์๋ฅผ ์ค์ ํ์ฌ ์ถฉ๋์ ๋ฐฉ์งํ๋ค.
|
|
@@ -24,6 +26,8 @@ from pathlib import Path
|
|
| 24 |
|
| 25 |
import pandas as pd
|
| 26 |
|
|
|
|
|
|
|
| 27 |
ROOT = Path(__file__).resolve().parent
|
| 28 |
sys.path.insert(0, str(ROOT))
|
| 29 |
|
|
@@ -91,6 +95,8 @@ from src.domains.time_series_prediction.llm_adjustment_service import (
|
|
| 91 |
apply_adjustment,
|
| 92 |
)
|
| 93 |
|
|
|
|
|
|
|
| 94 |
logging.basicConfig(
|
| 95 |
level=logging.INFO,
|
| 96 |
format="%(asctime)s - %(levelname)s - %(message)s",
|
|
|
|
| 8 |
import sys
|
| 9 |
from contextlib import asynccontextmanager
|
| 10 |
|
| 11 |
+
print(">>> [boot] main.py ์ง์
(stdlib ์ํฌํธ ์๋ฃ)", flush=True) # ์์ ์ง๋จ
|
| 12 |
+
|
| 13 |
# macOS Apple Silicon์์ PyTorch์ LightGBM์ด ์๋ก ๋ค๋ฅธ OpenMP ๋ฐํ์(libiomp/libomp)์
|
| 14 |
# ๋์์ ์ด๊ธฐํํ ๋ ํ๋ก์ธ์ค๊ฐ ์ถฉ๋ํ๋ค.
|
| 15 |
# ML ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ํฌํธ ์ ์ ํ๊ฒฝ๋ณ์๋ฅผ ์ค์ ํ์ฌ ์ถฉ๋์ ๋ฐฉ์งํ๋ค.
|
|
|
|
| 26 |
|
| 27 |
import pandas as pd
|
| 28 |
|
| 29 |
+
print(">>> [boot] pandas ์ํฌํธ ์๋ฃ, fastapi/์๋น์ค ๋ชจ๋ ์ํฌํธ ์์", flush=True) # ์์ ์ง๋จ
|
| 30 |
+
|
| 31 |
ROOT = Path(__file__).resolve().parent
|
| 32 |
sys.path.insert(0, str(ROOT))
|
| 33 |
|
|
|
|
| 95 |
apply_adjustment,
|
| 96 |
)
|
| 97 |
|
| 98 |
+
print(">>> [boot] ๋ชจ๋ ๋ชจ๋ ์ํฌํธ ์๋ฃ, FastAPI ์ฑ ์์ฑ", flush=True) # ์์ ์ง๋จ
|
| 99 |
+
|
| 100 |
logging.basicConfig(
|
| 101 |
level=logging.INFO,
|
| 102 |
format="%(asctime)s - %(levelname)s - %(message)s",
|