File size: 697 Bytes
3fe0be9
 
 
 
 
 
 
9c54070
3fe0be9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
32
33
FROM python:3.9-slim

# ์‹œ์Šคํ…œ ์˜์กด์„ฑ ์„ค์น˜
RUN apt-get update && apt-get install -y \
    git \
    ffmpeg \
    libsndfile1 \
    libasound2-dev \
    && rm -rf /var/lib/apt/lists/*

# ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ ์„ค์ •
WORKDIR /app

# ์บ์‹œ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ๋ฐ ํผ๋ฏธ์…˜ ๋ถ€์—ฌ
RUN mkdir -p /app/cache && chmod -R 777 /app/cache

# ์บ์‹œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •
ENV HF_HOME=/app/cache
ENV TRANSFORMERS_CACHE=/app/cache
ENV HUGGINGFACE_HUB_CACHE=/app/cache

# requirements.txt ์„ค์น˜
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# ์†Œ์Šค ๋ณต์‚ฌ
COPY . .

# ํฌํŠธ ๋…ธ์ถœ
EXPOSE 7860

# ์•ฑ ์‹คํ–‰
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]