From d09e5916ff5af3b7e29d56883c2ffd2bceed7564 Mon Sep 17 00:00:00 2001 From: Chip Thien Date: Sat, 11 Jul 2020 01:39:46 -0500 Subject: [PATCH 1/2] Dockerize detector. Chip --- Dockerfile | 13 +++++++++++++ start.sh | 1 + 2 files changed, 14 insertions(+) create mode 100644 Dockerfile create mode 100755 start.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..953668a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.7.3-slim-stretch + +WORKDIR / +COPY detector-base.pt /detector-base.pt +# TODO: keep root/.cache/torch/transformers/ between runs +# Make changes to the requirements/app here. +# This Dockerfile order allows Docker to cache the checkpoint layer +# and improve build times if making changes. +COPY requirements.txt requirements.txt +RUN pip3 --no-cache-dir install -r requirements.txt +COPY detector/ /detector + +ENTRYPOINT ["python3", "-m", "detector.server", "detector-base.pt"] diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..53ece3e --- /dev/null +++ b/start.sh @@ -0,0 +1 @@ +docker run --rm -p 8080:8080 gpt-2-detector From cc09797364dc7a9458007803286571e106af0c10 Mon Sep 17 00:00:00 2001 From: Chip Thien Date: Sat, 1 Aug 2020 16:03:25 -0500 Subject: [PATCH 2/2] Remove comments --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 953668a..bcf92a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,6 @@ FROM python:3.7.3-slim-stretch WORKDIR / COPY detector-base.pt /detector-base.pt # TODO: keep root/.cache/torch/transformers/ between runs -# Make changes to the requirements/app here. -# This Dockerfile order allows Docker to cache the checkpoint layer -# and improve build times if making changes. COPY requirements.txt requirements.txt RUN pip3 --no-cache-dir install -r requirements.txt COPY detector/ /detector