From c9cc096ec936cb55b5a81b36d8bbd50d56ebd285 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 7 Sep 2021 17:20:13 -0700 Subject: [PATCH] Simplify docker build We don't need kfserving images since we updated our cluster to 1.20 --- dockerfiles/Dockerfile | 8 +------- dockerfiles/hooks/build | 8 -------- dockerfiles/hooks/post_push | 6 ------ 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 303e9d2f..e8ffac30 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -2,8 +2,6 @@ ARG BASE_IMAGE=registry.access.redhat.com/ubi8/ubi:latest FROM ${BASE_IMAGE} -ARG USER=genienlp - MAINTAINER Thingpedia Admins USER root @@ -12,7 +10,6 @@ USER root COPY . /opt/genienlp # install basic tools and python3, install dependencies, and then cleanup -# HACK: we need to download the wheel manually or docker will die RUN dnf -y install git gcc gcc-c++ make cmake && \ dnf -y module enable python38 \ && dnf -y install python38 \ @@ -30,10 +27,7 @@ RUN dnf -y install git gcc gcc-c++ make cmake && \ # add user genienlp RUN useradd -ms /bin/bash -r genienlp - -# User root is required for kfserving until https://github.com/aws/amazon-eks-pod-identity-webhook/issues/8 is fixed. -# There is a workaround by changing pod fsgroup but kfserving inference service cannot set pod level security context. -USER ${USER} +USER genienlp WORKDIR /home/genienlp ENTRYPOINT ["/opt/genienlp/dockerfiles/start.sh"] diff --git a/dockerfiles/hooks/build b/dockerfiles/hooks/build index c48f4cb8..311db77f 100755 --- a/dockerfiles/hooks/build +++ b/dockerfiles/hooks/build @@ -10,14 +10,6 @@ case $DOCKER_TAG in docker build --build-arg BASE_IMAGE=nvidia/cuda:10.1-runtime-ubi8 -f $(basename $DOCKERFILE_PATH) -t $IMAGE_NAME .. ;; - *-cuda-kfserver) - docker build --build-arg BASE_IMAGE=nvidia/cuda:10.1-runtime-ubi8 --build-arg USER=root -f $(basename $DOCKERFILE_PATH) -t $IMAGE_NAME .. - ;; - - *-kfserver) - docker build --build-arg USER=root -f $(basename $DOCKERFILE_PATH) -t $IMAGE_NAME .. - ;; - *) docker build -f $(basename $DOCKERFILE_PATH) -t $IMAGE_NAME .. ;; diff --git a/dockerfiles/hooks/post_push b/dockerfiles/hooks/post_push index 66b64b9a..6cf4c927 100755 --- a/dockerfiles/hooks/post_push +++ b/dockerfiles/hooks/post_push @@ -10,12 +10,6 @@ case $DOCKER_TAG in *-cuda) version=${version}-cuda ;; - *-cuda-kfserver) - version=${version}-cuda-kfserver - ;; - *-kfserver) - version=${version}-kfserver - ;; esac docker tag $IMAGE_NAME $DOCKER_REPO:$version docker push $DOCKER_REPO:$version