From bc20fefbd56590b04173fa80e0f996e483ad86e4 Mon Sep 17 00:00:00 2001 From: nruest Date: Wed, 28 Aug 2024 08:35:17 -0400 Subject: [PATCH] Setup project to make use of Docker. - Add Dockerfile; - Update README to provide Docker instructions; - Pin dependencies so the project can build. --- Dockerfile | 15 +++++++++++++++ README.md | 6 ++++++ pyproject.toml | 24 +++++++++++++----------- 3 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..00c6661 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.10.6 + +RUN mkdir -p /app/images + +WORKDIR /app + +COPY ./ /app + +RUN pip install poetry + +RUN poetry install + +EXPOSE 8501 + +CMD ["poetry", "run", "memery", "serve", "/app/images"] diff --git a/README.md b/README.md index accf958..1fcdf3d 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,12 @@ pip install memery pip install git+https://github.com/openai/CLIP.git ``` +From Docker +``` +docker build -t memery . +docker run -it -p 8501:8501 -v /path/to/images:/app/images +``` + Currently memery defaults to GPU installation. This will probably be switched in a future version. diff --git a/pyproject.toml b/pyproject.toml index 4efc6b3..32a26e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,24 +6,26 @@ authors = ["deepfates ", "wkrettek =1.0.0"]