Skip to content

Commit

Permalink
Included gRPC dependency modules and exposed the gRPC service port
Browse files Browse the repository at this point in the history
  • Loading branch information
chandrams committed Apr 27, 2022
1 parent 43aa40b commit 41212e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Dockerfile.hpo
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WORKDIR /opt/app

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

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

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


EXPOSE 8085
EXPOSE 50051

ENTRYPOINT python3 -u src/service.py
2 changes: 1 addition & 1 deletion scripts/cluster-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function docker_start() {

check_prereq running ${SERVICE_STATUS_DOCKER}

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

echo
Expand Down

0 comments on commit 41212e7

Please sign in to comment.