Simplify docker build

We don't need kfserving images since we updated our cluster
to 1.20
This commit is contained in:
Giovanni Campagna 2021-09-07 17:20:13 -07:00
parent 54aada806b
commit c9cc096ec9
3 changed files with 1 additions and 21 deletions

View File

@ -2,8 +2,6 @@
ARG BASE_IMAGE=registry.access.redhat.com/ubi8/ubi:latest
FROM ${BASE_IMAGE}
ARG USER=genienlp
MAINTAINER Thingpedia Admins <thingpedia-admins@lists.stanford.edu>
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"]

View File

@ -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 ..
;;

View File

@ -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