Skip to content

Commit

Permalink
Update Dockerfile to using cache layer
Browse files Browse the repository at this point in the history
Signed-off-by: jimmy <[email protected]>
Signed-off-by: piggy2303 <[email protected]>
  • Loading branch information
piggy2303 committed Oct 12, 2024
1 parent 456fe4c commit db78048
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ ARG NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
FROM $GOLANG_IMAGE AS build
FROM $GOLANG_IMAGE AS gobuild
ARG GOPROXY
ADD go.mod /k8s-vgpu
ADD go.sum /k8s-vgpu
RUN go mod download
ADD . /k8s-vgpu
#RUN --mount=type=cache,target=/go/pkg/mod \
# cd /k8s-vgpu && make all
RUN cd /k8s-vgpu && make all

FROM $NVIDIA_IMAGE AS nvbuild
COPY ./libvgpu /libvgpu
WORKDIR /libvgpu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update; apt-get -y install cmake
COPY ./libvgpu /libvgpu
WORKDIR /libvgpu
RUN bash ./build.sh

FROM nvidia/cuda:12.4.1-base-ubuntu22.04
Expand Down

0 comments on commit db78048

Please sign in to comment.