1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-04-29 04:04:45 +00:00

metrics: Add Dockerfile for ResNet50 int8

This PR adds the dockerfile for ResNet50 int8 benchmark.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Gabriela Cervantes 2023-08-15 17:36:48 +00:00
parent 6d971ba8df
commit 24baededc0
2 changed files with 23 additions and 2 deletions
tests/metrics/machine_learning

View File

@ -0,0 +1,21 @@
# Copyright (c) 2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
# Usage: FROM [image name]
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Version of the Dockerfile
LABEL DOCKERFILE_VERSION="1.0"
RUN apt-get update && \
apt-get install -y --no-install-recommends wget nano curl build-essential git && \
apt-get install -y python3.8 python3-pip && \
pip install intel-tensorflow-avx512==2.8.0 && \
pip install protobuf==3.20.* && \
wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v1_8/resnet50_int8_pretrained_model.pb && \
git clone https://github.com/IntelAI/models.git
CMD ["/bin/bash"]

View File

@ -11,7 +11,7 @@ SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
source "${SCRIPT_PATH}/../lib/common.bash"
IMAGE="docker.io/library/resnet50int8:latest"
DOCKERFILE="${SCRIPT_PATH}/resnet50_int8/Dockerfile"
DOCKERFILE="${SCRIPT_PATH}/resnet50_int8_dockerfile/Dockerfile"
tensorflow_file=$(mktemp tensorflowresults.XXXXXXXXXX)
NUM_CONTAINERS="$1"
TIMEOUT="$2"
@ -22,7 +22,7 @@ TESTDIR="${TESTDIR:-/testdir}"
dst_dir="/host"
src_dir=$(mktemp --tmpdir -d tensorflowresnet50int8.XXXXXXXXXX)
MOUNT_OPTIONS="type=bind,src=$src_dir,dst=$dst_dir,options=rbind:ro"
start_script="resnet50_start.sh"
start_script="resnet50int8_start.sh"
# CMD points to the script that starts the workload
# export DNNL_MAX_CPU_ISA=AVX512_CORE_AMX
CMD="export KMP_AFFINITY=granularity=fine,verbose,compact && export OMP_NUM_THREADS=16 && $dst_dir/$start_script"