Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile to using cache layer #534

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/call-release-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
workflow_dispatch:
inputs:
ref:
description: 'tag, sha, branch'
description: "tag, sha, branch"
required: true
default: v1.0.0

Expand Down
8 changes: 6 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ ARG NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
FROM $GOLANG_IMAGE AS build
FROM $GOLANG_IMAGE AS gobuild
ARG GOPROXY
WORKDIR /k8s-vgpu
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
2 changes: 1 addition & 1 deletion docker/Dockerfile.withlib
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ADD . /k8s-vgpu
ARG GOPROXY=https://goproxy.cn,direct
RUN cd /k8s-vgpu && make all

FROM ubuntu:20.04
FROM ubuntu:24.04
ENV NVIDIA_DISABLE_REQUIRE="true"
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility
Expand Down
Loading