File size: 790 Bytes
86a8165
 
 
 
 
 
072f720
86a8165
 
 
 
 
 
 
 
 
 
 
 
 
3e6a996
 
 
 
 
86a8165
 
 
3e6a996
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# HuggingFace Spaces โ€” ๋…ธ์ฝ”๋”ฉ Python+ ๋ฐฐํฌ์šฉ
FROM python:3.11-slim

# ํ•œ๊ธ€ ํฐํŠธ ๋ฐ ๊ธฐ๋ณธ ํŒจํ‚ค์ง€ ์„ค์น˜
RUN apt-get update && apt-get install -y \
    fonts-nanum \
    fontconfig \
    && fc-cache -fv \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Python ํŒจํ‚ค์ง€ ๋จผ์ € ์„ค์น˜ (์บ์‹œ ํ™œ์šฉ)
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# ์•ฑ ํŒŒ์ผ ์ „์ฒด ๋ณต์‚ฌ
COPY . .

# static/ ํด๋” ์ƒ์„ฑ ํ›„ ํŒŒ์ผ ์ด๋™ (๋ฃจํŠธ์— ์—…๋กœ๋“œ๋œ ๊ฒฝ์šฐ ๋Œ€์‘)
RUN mkdir -p static uploads results && \
    for f in app.js index.html style.css; do \
        [ -f "$f" ] && mv "$f" static/ || true; \
    done

EXPOSE 7860

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]