hiddenFront commited on
Commit
b19b1ca
ยท
verified ยท
1 Parent(s): 437418a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -8
Dockerfile CHANGED
@@ -1,13 +1,32 @@
1
- FROM python:3.9
2
 
3
- RUN useradd -m -u 1000 user
4
- USER user
5
- ENV PATH="/home/user/.local/bin:$PATH"
6
 
 
7
  WORKDIR /app
8
 
9
- COPY --chown=user ./requirements.txt requirements.txt
10
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
 
12
- COPY --chown=user . /app
13
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
 
3
+ # ํ•„์ˆ˜ ํŒจํ‚ค์ง€ ์„ค์น˜
4
+ RUN apt-get update && apt-get install -y git
 
5
 
6
+ # ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ ์„ค์ •
7
  WORKDIR /app
8
 
9
+ # requirements ๋จผ์ € ๋ณต์‚ฌ
10
+ COPY requirements.txt .
11
 
12
+ # requirements ์„ค์น˜ (kobert_tokenizer ์ œ์™ธ)
13
+ RUN pip install --no-cache-dir --upgrade pip \
14
+ && pip install --no-cache-dir --upgrade \
15
+ fastapi \
16
+ uvicorn \
17
+ torch==1.0.0 \
18
+ transformers==3.0.2 \
19
+ tokenizers==0.7.0 \
20
+ sentencepiece \
21
+ numpy==1.23.1 \
22
+ protobuf==3.20.3 \
23
+ psutil \
24
+ gluonnlp==0.10.0 \
25
+ mxnet-mkl==1.6.0 \
26
+ && pip install git+https://github.com/SKTBrain/KOBERT#egg=kobert_tokenizer\&subdirectory=kobert_tokenizer
27
+
28
+ # ์ „์ฒด ์ฝ”๋“œ ๋ณต์‚ฌ
29
+ COPY . .
30
+
31
+ # FastAPI ์‹คํ–‰
32
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]