Currently, only one CI build can be started at the same time due to we only have only one testing cluster. This PR aims to enable multiple concurrent builds can be triggered to reduce the waiting time for CI builds. The major changes listed below: 1. Each build generate unique images for testing and debugging 2. Check whether the testing cluster is being used by another build. 3. Cache docker image & go mod after build finished 4. Improve dockerfiles for reusing docker build cache
24 lines
453 B
Docker
24 lines
453 B
Docker
ARG GO_VERSION=1.9.2
|
|
|
|
FROM tensorflow/serving as serving
|
|
RUN apt update && apt install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
|
|
FROM golang:${GO_VERSION} AS builder
|
|
|
|
ENV GOPATH /usr
|
|
ENV APP ${GOPATH}/src/github.com/fission/fission/environments/tensorflow-serving
|
|
|
|
WORKDIR ${APP}
|
|
|
|
ADD server.go ${APP}
|
|
|
|
RUN go get
|
|
RUN go build -a -o /server server.go
|
|
|
|
FROM serving
|
|
WORKDIR /
|
|
COPY --from=builder /server /
|
|
|
|
ENTRYPOINT ["/server"]
|
|
EXPOSE 8888
|