Skip to content

Commit defaf14

Browse files
hXl3snv-kkudrynski
authored andcommitted
[Convnets/TF] Move inference dependencies into separate container
1 parent abe0628 commit defaf14

File tree

3 files changed

+31
-21
lines changed

3 files changed

+31
-21
lines changed
Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,10 @@
11
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:20.12-tf1-py3
2-
ARG TRITON_CLIENT_IMAGE_NAME=nvcr.io/nvidia/tritonserver:20.12-py3-sdk
3-
FROM ${TRITON_CLIENT_IMAGE_NAME} as triton-client
42
FROM ${FROM_IMAGE_NAME}
53

6-
# Install perf_client required library
7-
RUN apt-get update && \
8-
apt-get install -y libb64-dev libb64-0d && \
9-
apt-get clean && \
10-
rm -rf /var/lib/apt/lists/*
11-
12-
# Install Triton Client PythonAPI and copy Perf Client
13-
COPY --from=triton-client /workspace/install/ /workspace/install/
14-
ENV LD_LIBRARY_PATH /workspace/install/lib:${LD_LIBRARY_PATH}
15-
RUN find /workspace/install/python/ -iname triton*manylinux*.whl -exec pip install {}[all] \;
16-
17-
# Setup environmnent variables to access Triton Client lib and bin
18-
ENV PATH /workspace/install/bin:${PATH}
19-
204
ENV PYTHONPATH /workspace/rn50v15_tf
215
WORKDIR /workspace/rn50v15_tf
226

23-
RUN pip uninstall -y typing
24-
257
ADD requirements.txt .
26-
ADD triton/requirements.txt triton/requirements.txt
278
RUN pip install -r requirements.txt
28-
RUN pip install -r triton/requirements.txt
299

3010
ADD . .
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:20.12-tf1-py3
2+
ARG TRITON_CLIENT_IMAGE_NAME=nvcr.io/nvidia/tritonserver:20.12-py3-sdk
3+
FROM ${TRITON_CLIENT_IMAGE_NAME} as triton-client
4+
FROM ${FROM_IMAGE_NAME}
5+
6+
# Install perf_client required library
7+
RUN apt-get update && \
8+
apt-get install -y libb64-dev libb64-0d && \
9+
apt-get clean && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
# Install Triton Client PythonAPI and copy Perf Client
13+
COPY --from=triton-client /workspace/install/ /workspace/install/
14+
ENV LD_LIBRARY_PATH /workspace/install/lib:${LD_LIBRARY_PATH}
15+
RUN find /workspace/install/python/ -iname triton*manylinux*.whl -exec pip install {}[all] \;
16+
17+
# Setup environmnent variables to access Triton Client lib and bin
18+
ENV PATH /workspace/install/bin:${PATH}
19+
20+
ENV PYTHONPATH /workspace/rn50v15_tf
21+
WORKDIR /workspace/rn50v15_tf
22+
23+
RUN pip uninstall -y typing
24+
25+
ADD requirements.txt .
26+
ADD triton/requirements.txt triton/requirements.txt
27+
RUN pip install -r requirements.txt
28+
RUN pip install -r triton/requirements.txt
29+
30+
ADD . .

TensorFlow/Classification/ConvNets/triton/scripts/docker/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
docker build -t resnet50 . -f Dockerfile
16+
docker build -t resnet50 . -f Dockerfile.inference

0 commit comments

Comments
 (0)