From 13c734db06f8d65117ade850ff2a64cc8edfe0b1 Mon Sep 17 00:00:00 2001 From: JoelH96 <41146991+JoelH96@users.noreply.github.com> Date: Mon, 2 Dec 2019 12:17:32 +0000 Subject: [PATCH] Updated s2i Dockerfiles to build using requirements.txt (#1160) * Updated GPU wrapper to uninstall TF without GPU * Updated GPU wrapper * Updated Python-GPU Wrapper * Integrated Python GPU wrapper into main Python folder" * Removed old Python-GPU folder * Setting TF-GPU to version 1.13.1 * Merged with master * Python dependencies added as requirements.txt files * Updated to master * updated s2i Python scripts to include requirements.txt * Pinned seldon core versions to 0.5.1 --- wrappers/s2i/python-conda/Dockerfile | 3 ++- wrappers/s2i/python-conda/requirements.txt | 1 + wrappers/s2i/python/Dockerfile.gpu.tmpl | 7 ++----- wrappers/s2i/python/Dockerfile.tmpl | 3 ++- wrappers/s2i/python/requirements.txt | 1 + wrappers/s2i/python/requirements_gpu.txt | 4 ++++ 6 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 wrappers/s2i/python-conda/requirements.txt create mode 100644 wrappers/s2i/python/requirements.txt create mode 100644 wrappers/s2i/python/requirements_gpu.txt diff --git a/wrappers/s2i/python-conda/Dockerfile b/wrappers/s2i/python-conda/Dockerfile index 5b81168bb7..673987dbc3 100644 --- a/wrappers/s2i/python-conda/Dockerfile +++ b/wrappers/s2i/python-conda/Dockerfile @@ -7,6 +7,7 @@ WORKDIR /microservice COPY ./s2i/bin/ /s2i/bin -RUN pip install seldon-core +COPY requirements.txt ./requirements.txt +RUN pip install -r requirements.txt EXPOSE 5000 diff --git a/wrappers/s2i/python-conda/requirements.txt b/wrappers/s2i/python-conda/requirements.txt new file mode 100644 index 0000000000..b5adf4a540 --- /dev/null +++ b/wrappers/s2i/python-conda/requirements.txt @@ -0,0 +1 @@ +seldon-core==0.5.1 diff --git a/wrappers/s2i/python/Dockerfile.gpu.tmpl b/wrappers/s2i/python/Dockerfile.gpu.tmpl index c4e2b107dc..c874643cc8 100644 --- a/wrappers/s2i/python/Dockerfile.gpu.tmpl +++ b/wrappers/s2i/python/Dockerfile.gpu.tmpl @@ -13,11 +13,8 @@ WORKDIR /microservice COPY ./s2i/bin/ /s2i/bin # keep install of seldon-core after the COPY to force re-build of layer -RUN pip3 install seldon-core -RUN pip3 install tensorflow-gpu==1.13.1 - -# Numpy version 1.16.1 required for tf-gpu -RUN pip3 install numpy==1.16.1 +COPY requirements_gpu.txt ./requirements.txt +RUN pip3 install -r requirements.txt EXPOSE 5000 diff --git a/wrappers/s2i/python/Dockerfile.tmpl b/wrappers/s2i/python/Dockerfile.tmpl index 84a658de70..89e423fd9e 100644 --- a/wrappers/s2i/python/Dockerfile.tmpl +++ b/wrappers/s2i/python/Dockerfile.tmpl @@ -11,6 +11,7 @@ WORKDIR /microservice COPY ./s2i/bin/ /s2i/bin # keep install of seldon-core after the COPY to force re-build of layer -RUN pip install seldon-core +COPY requirements.txt ./requirements.txt +RUN pip install -r requirements.txt EXPOSE 5000 diff --git a/wrappers/s2i/python/requirements.txt b/wrappers/s2i/python/requirements.txt new file mode 100644 index 0000000000..b5adf4a540 --- /dev/null +++ b/wrappers/s2i/python/requirements.txt @@ -0,0 +1 @@ +seldon-core==0.5.1 diff --git a/wrappers/s2i/python/requirements_gpu.txt b/wrappers/s2i/python/requirements_gpu.txt new file mode 100644 index 0000000000..b970658c4f --- /dev/null +++ b/wrappers/s2i/python/requirements_gpu.txt @@ -0,0 +1,4 @@ +seldon-core==0.5.1 +tensorflow-gpu==1.13.1 +numpy==1.16.1 +