[Convnets/TF] Move inference dependencies into separate container
This commit is contained in:
parent
abe062867f
commit
defaf144ba
|
@ -1,30 +1,10 @@
|
||||||
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:20.12-tf1-py3
|
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:20.12-tf1-py3
|
||||||
ARG TRITON_CLIENT_IMAGE_NAME=nvcr.io/nvidia/tritonserver:20.12-py3-sdk
|
|
||||||
FROM ${TRITON_CLIENT_IMAGE_NAME} as triton-client
|
|
||||||
FROM ${FROM_IMAGE_NAME}
|
FROM ${FROM_IMAGE_NAME}
|
||||||
|
|
||||||
# Install perf_client required library
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y libb64-dev libb64-0d && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Install Triton Client PythonAPI and copy Perf Client
|
|
||||||
COPY --from=triton-client /workspace/install/ /workspace/install/
|
|
||||||
ENV LD_LIBRARY_PATH /workspace/install/lib:${LD_LIBRARY_PATH}
|
|
||||||
RUN find /workspace/install/python/ -iname triton*manylinux*.whl -exec pip install {}[all] \;
|
|
||||||
|
|
||||||
# Setup environmnent variables to access Triton Client lib and bin
|
|
||||||
ENV PATH /workspace/install/bin:${PATH}
|
|
||||||
|
|
||||||
ENV PYTHONPATH /workspace/rn50v15_tf
|
ENV PYTHONPATH /workspace/rn50v15_tf
|
||||||
WORKDIR /workspace/rn50v15_tf
|
WORKDIR /workspace/rn50v15_tf
|
||||||
|
|
||||||
RUN pip uninstall -y typing
|
|
||||||
|
|
||||||
ADD requirements.txt .
|
ADD requirements.txt .
|
||||||
ADD triton/requirements.txt triton/requirements.txt
|
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
RUN pip install -r triton/requirements.txt
|
|
||||||
|
|
||||||
ADD . .
|
ADD . .
|
||||||
|
|
30
TensorFlow/Classification/ConvNets/Dockerfile.inference
Normal file
30
TensorFlow/Classification/ConvNets/Dockerfile.inference
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:20.12-tf1-py3
|
||||||
|
ARG TRITON_CLIENT_IMAGE_NAME=nvcr.io/nvidia/tritonserver:20.12-py3-sdk
|
||||||
|
FROM ${TRITON_CLIENT_IMAGE_NAME} as triton-client
|
||||||
|
FROM ${FROM_IMAGE_NAME}
|
||||||
|
|
||||||
|
# Install perf_client required library
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y libb64-dev libb64-0d && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Triton Client PythonAPI and copy Perf Client
|
||||||
|
COPY --from=triton-client /workspace/install/ /workspace/install/
|
||||||
|
ENV LD_LIBRARY_PATH /workspace/install/lib:${LD_LIBRARY_PATH}
|
||||||
|
RUN find /workspace/install/python/ -iname triton*manylinux*.whl -exec pip install {}[all] \;
|
||||||
|
|
||||||
|
# Setup environmnent variables to access Triton Client lib and bin
|
||||||
|
ENV PATH /workspace/install/bin:${PATH}
|
||||||
|
|
||||||
|
ENV PYTHONPATH /workspace/rn50v15_tf
|
||||||
|
WORKDIR /workspace/rn50v15_tf
|
||||||
|
|
||||||
|
RUN pip uninstall -y typing
|
||||||
|
|
||||||
|
ADD requirements.txt .
|
||||||
|
ADD triton/requirements.txt triton/requirements.txt
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
RUN pip install -r triton/requirements.txt
|
||||||
|
|
||||||
|
ADD . .
|
|
@ -13,4 +13,4 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
docker build -t resnet50 . -f Dockerfile
|
docker build -t resnet50 . -f Dockerfile.inference
|
||||||
|
|
Loading…
Reference in a new issue