Skip to content

Commit 41212e7

Browse files
committed
Included gRPC dependency modules and exposed the gRPC service port
1 parent 43aa40b commit 41212e7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Dockerfile.hpo

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ WORKDIR /opt/app
2525

2626
# Install packages needed for python to function correctly
2727
# Create the non root user, same as the one used in the build phase.
28-
RUN microdnf install -y python3 \
28+
RUN microdnf install -y python3 gcc-c++ python3-devel \
2929
&& microdnf update -y \
3030
&& microdnf -y install shadow-utils \
3131
&& adduser -u 1001 -G root -s /usr/sbin/nologin default \
@@ -38,7 +38,7 @@ RUN microdnf install -y python3 \
3838
USER 1001
3939

4040
# Install optuna to the default user
41-
RUN python3 -m pip install --user optuna requests scikit-optimize jsonschema
41+
RUN python3 -m pip install --user optuna requests scikit-optimize jsonschema click grpcio google-api-core
4242

4343
LABEL name="Kruize HPO" \
4444
vendor="Red Hat" \
@@ -54,5 +54,6 @@ COPY --chown=1001:0 index.html /opt/app/
5454

5555

5656
EXPOSE 8085
57+
EXPOSE 50051
5758

5859
ENTRYPOINT python3 -u src/service.py

scripts/cluster-helpers.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function docker_start() {
6969

7070
check_prereq running ${SERVICE_STATUS_DOCKER}
7171

72-
${CONTAINER_RUNTIME} run -d --name hpo_docker_container -p 8085:8085 ${HPO_CONTAINER_IMAGE} >/dev/null 2>&1
72+
${CONTAINER_RUNTIME} run -d --name hpo_docker_container -p 8085:8085 -p 50051:50051 ${HPO_CONTAINER_IMAGE} >/dev/null 2>&1
7373
check_err "Unexpected error occured. Service Stopped!"
7474

7575
echo

0 commit comments

Comments
 (0)