docker
This commit is contained in:
parent
00c6d77380
commit
9d303d99d3
3 changed files with 11 additions and 7 deletions
7
api/Dockerfile
Normal file
7
api/Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# syntax-docker/dockerfile:1
|
||||||
|
FROM pytorch/pytorch
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt requirements.txt
|
||||||
|
RUN pip3 install -r requirements.txt
|
||||||
|
COPY . .
|
||||||
|
CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]
|
|
@ -1,6 +1,3 @@
|
||||||
fastapi>=0.89.1
|
fastapi
|
||||||
torch>=1.13.1
|
uvicorn
|
||||||
torchaudio>=0.13.1
|
transformers
|
||||||
torchvision>=0.14.1
|
|
||||||
transformers>=4.26.0
|
|
||||||
uvicorn>=0.20.0
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tokenizer = AutoTokenizer.from_pretrained(
|
||||||
"microsoft/DialoGPT-large", padding_side='left'
|
"microsoft/DialoGPT-large", padding_side='left'
|
||||||
)
|
)
|
||||||
model = AutoModelForCausalLM.from_pretrained(
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
"../train/cartman/models/output-medium"
|
"src/bots/cartman"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue