From 9d303d99d38f3d54bcbd4cf6cddbaeb94f88a84c Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Thu, 9 Feb 2023 18:05:05 -0500 Subject: [PATCH] docker --- api/Dockerfile | 7 +++++++ api/requirements.txt | 9 +++------ api/src/bots/cartman.py | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 api/Dockerfile diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 0000000..b4bfd18 --- /dev/null +++ b/api/Dockerfile @@ -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"] diff --git a/api/requirements.txt b/api/requirements.txt index cdeacd1..7e5ff66 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,6 +1,3 @@ -fastapi>=0.89.1 -torch>=1.13.1 -torchaudio>=0.13.1 -torchvision>=0.14.1 -transformers>=4.26.0 -uvicorn>=0.20.0 +fastapi +uvicorn +transformers diff --git a/api/src/bots/cartman.py b/api/src/bots/cartman.py index a4e499d..df6b7b8 100644 --- a/api/src/bots/cartman.py +++ b/api/src/bots/cartman.py @@ -7,7 +7,7 @@ tokenizer = AutoTokenizer.from_pretrained( "microsoft/DialoGPT-large", padding_side='left' ) model = AutoModelForCausalLM.from_pretrained( - "../train/cartman/models/output-medium" + "src/bots/cartman" )