Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Madelen Andersson <[email protected]>
  • Loading branch information
johan-olsson-work and madelen-at-work authored Sep 10, 2024
1 parent 2911cae commit c11cb9f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Dockerfile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ RUN <<EOF
apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
git \
&& rm -rf /var/lib/apt/lists/*
git
rm -rf /var/lib/apt/lists/*
EOF
# grpcio-tools contains protoc, which allows to build the pb2.py files in the install-tf.sh script.
# Installing directly grpcio-tools result in an older version of protobuf.
RUN pip install --no-cache-dir \
RUN <<EOF
pip install --no-cache-dir \
grpcio==${GRPC_VERSION} \
protobuf==${PROTOBUF_VERSION} \
six==${SIX_VERSION}
RUN pip install --no-dependencies \
pip install --no-dependencies \
grpcio-tools==${GRPCIO_TOOLS_VERSION}
EOF
# Build TensorFlow serving proto files
WORKDIR /build/tf
Expand Down Expand Up @@ -65,13 +67,19 @@ COPY apis/wrappers/tf_proto_utils.py ./proto_utils
#Build vdo proto
WORKDIR /build/vdo
COPY apis/videocapture.proto ./
RUN mkdir ./proto_utils && python3 -m grpc_tools.protoc -I . --python_out=./proto_utils --grpc_python_out=./proto_utils videocapture.proto
RUN <<EOF
mkdir ./proto_utils
python3 -m grpc_tools.protoc -I . --python_out=./proto_utils --grpc_python_out=./proto_utils videocapture.proto
EOF
COPY apis/wrappers/vdo_proto_utils.py ./proto_utils
# Build keyvalue proto
WORKDIR /build/param
COPY apis/keyvaluestore.proto ./
RUN mkdir ./proto_utils && python3 -m grpc_tools.protoc -I . --python_out=./proto_utils --grpc_python_out=./proto_utils keyvaluestore.proto
RUN <<EOF
mkdir ./proto_utils
python3 -m grpc_tools.protoc -I . --python_out=./proto_utils --grpc_python_out=./proto_utils keyvaluestore.proto
EOF
# Saving required libraries versions into a file
RUN pip freeze | grep -E '^(grpcio|protobuf|six)==' > /build/requirements.txt

0 comments on commit c11cb9f

Please sign in to comment.