File size: 773 Bytes
b19b1ca
48f468d
b19b1ca
 
48f468d
b19b1ca
48f468d
 
b19b1ca
 
48f468d
b19b1ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

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

# requirements ๋จผ์ € ๋ณต์‚ฌ
COPY requirements.txt .

# requirements ์„ค์น˜ (kobert_tokenizer ์ œ์™ธ)
RUN pip install --no-cache-dir --upgrade pip \
 && pip install --no-cache-dir --upgrade \
    fastapi \
    uvicorn \
    torch==1.0.0 \
    transformers==3.0.2 \
    tokenizers==0.7.0 \
    sentencepiece \
    numpy==1.23.1 \
    protobuf==3.20.3 \
    psutil \
    gluonnlp==0.10.0 \
    mxnet-mkl==1.6.0 \
 && pip install git+https://github.com/SKTBrain/KOBERT#egg=kobert_tokenizer\&subdirectory=kobert_tokenizer

# ์ „์ฒด ์ฝ”๋“œ ๋ณต์‚ฌ
COPY . .

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