Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files34 unmodified lines3536373839404142434445464748495051525354555657585934 unmodified lines# pip ์ ๊ทธ๋ ์ด๋๋ฅผ ๋จผ์ ์ํํ์ฌ ์ต์ pip์ด wheel ํ์ผ์ ์ ์ฐพ๋๋ก ํฉ๋๋ค.RUN pip install --no-cache-dir --upgrade pip# ๋๋จธ์ง ํจํค์ง ์ค์น# --no-cache-dir: ์บ์๋ฅผ ์ฌ์ฉํ์ง ์์ ์ด๋ฏธ์ง ํฌ๊ธฐ๋ฅผ ์ค์ ๋๋ค.RUN pip install --no-cache-dir \fastapi \uvicorn \torch==1.13.1 \transformers==3.0.2 \tokenizers==0.8.1rc1 \sentencepiece \numpy==1.23.1 \protobuf==3.20.3 \psutil \gluonnlp==0.10.0 \mxnet-mkl==1.6.0# kobert_tokenizer๋ Git ์ ์ฅ์์์ ์ค์นํ๋ฏ๋ก ๋ณ๋ ๋ช ๋ น์ผ๋ก ๋ถ๋ฆฌํฉ๋๋ค.RUN pip install --no-cache-dir git+https://github.com/SKTBrain/KOBERT#egg=kobert_tokenizer\&subdirectory=kobert_tokenizer# FastAPI ์ ํ๋ฆฌ์ผ์ด์ ์คํ# --host 0.0.0.0: ๋ชจ๋ ๋คํธ์ํฌ ์ธํฐํ์ด์ค์์ ์ ๊ทผ ํ์ฉ# --port 7860: ์ ํ๋ฆฌ์ผ์ด์ ์ด ์์ ํ ํฌํธ (Render๋ $PORT ํ๊ฒฝ ๋ณ์๋ฅผ ์ฌ์ฉํ์ง๋ง, Dockerfile์์๋ ๊ณ ์ ํฌํธ ์ค์ )CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]34 unmodified lines35363738394041424344454647484950515253545556575834 unmodified lines# pip ์ ๊ทธ๋ ์ด๋๋ฅผ ๋จผ์ ์ํํ์ฌ ์ต์ pip์ด wheel ํ์ผ์ ์ ์ฐพ๋๋ก ํฉ๋๋ค.RUN pip install --no-cache-dir --upgrade pip# ๋ชจ๋ ํจํค์ง๋ฅผ ํ ๋ฒ์ ์ค์นํ์ฌ ์์กด์ฑ ์ถฉ๋์ ์ต์ํํ๊ณ , ์ต์ ๋ฒ์ ์ ์ฌ์ฉํฉ๋๋ค.# --no-cache-dir: ์บ์๋ฅผ ์ฌ์ฉํ์ง ์์ ์ด๋ฏธ์ง ํฌ๊ธฐ๋ฅผ ์ค์ ๋๋ค.RUN pip install --no-cache-dir \fastapi \uvicorn \torch==1.13.1 \transformers==4.30.2 \tokenizers==0.13.3 \sentencepiece \numpy==1.23.5 \protobuf==3.20.3 \psutil \gluonnlp==0.10.0 \mxnet-mkl==1.6.0 \huggingface_hub \git+https://github.com/SKTBrain/KOBERT#egg=kobert_tokenizer\&subdirectory=kobert_tokenizer# FastAPI ์ ํ๋ฆฌ์ผ์ด์ ์คํ# --host 0.0.0.0: ๋ชจ๋ ๋คํธ์ํฌ ์ธํฐํ์ด์ค์์ ์ ๊ทผ ํ์ฉ# --port 7860: ์ ํ๋ฆฌ์ผ์ด์ ์ด ์์ ํ ํฌํธ (Render๋ $PORT ํ๊ฒฝ ๋ณ์๋ฅผ ์ฌ์ฉํ์ง๋ง, Dockerfile์์๋ ๊ณ ์ ํฌํธ ์ค์ )CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+8-9