Skip to content

Commit b054212

Browse files
feat: update Dockerfile and Makefile for CUDA 12.6.3 support and adjust image names
1 parent 4e86da3 commit b054212

File tree

13 files changed

+299
-137
lines changed

13 files changed

+299
-137
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ docker:
77
docker build \
88
--build-arg GOLANG_IMAGE=${GOLANG_IMAGE} \
99
--build-arg TARGET_ARCH=${TARGET_ARCH} \
10+
--build-arg NVIDIA_DEVEL_IMAGE=${NVIDIA_DEVEL_IMAGE} \
1011
--build-arg NVIDIA_IMAGE=${NVIDIA_IMAGE} \
1112
--build-arg DEST_DIR=${DEST_DIR} \
1213
--build-arg VERSION=${VERSION} \
13-
--build-arg GOPROXY=https://goproxy.cn,direct \
1414
. -f=docker/Dockerfile -t ${IMG_TAG}
1515

1616
dockerwithlib:

docker/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
ARG GOLANG_IMAGE=golang:1.22.5-bullseye
2-
ARG NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
1+
ARG GOLANG_IMAGE
2+
ARG NVIDIA_IMAGE
3+
ARG NVIDIA_DEVEL_IMAGE
34

45
FROM $GOLANG_IMAGE AS build
56
FROM $GOLANG_IMAGE AS gobuild
@@ -11,14 +12,14 @@ ADD . /k8s-vgpu
1112
RUN cd /k8s-vgpu && make all VERSION=$VERSION
1213
RUN go install github.com/NVIDIA/mig-parted/cmd/[email protected]
1314

14-
FROM $NVIDIA_IMAGE AS nvbuild
15+
FROM $NVIDIA_DEVEL_IMAGE AS nvbuild
1516
COPY ./libvgpu /libvgpu
1617
WORKDIR /libvgpu
1718
ENV DEBIAN_FRONTEND=noninteractive
1819
RUN apt-get -y update; apt-get -y install cmake
1920
RUN bash ./build.sh
2021

21-
FROM nvidia/cuda:12.6.3-base-ubuntu22.04
22+
FROM $NVIDIA_IMAGE
2223
ENV NVIDIA_DISABLE_REQUIRE="true"
2324
ENV NVIDIA_VISIBLE_DEVICES=all
2425
ENV NVIDIA_DRIVER_CAPABILITIES=utility

pkg/nvidia-plugin/api/config/v1/config.go

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
/*
2-
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The HAMi Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
/*
10+
* Licensed to NVIDIA CORPORATION under one or more contributor
11+
* license agreements. See the NOTICE file distributed with
12+
* this work for additional information regarding copyright
13+
* ownership. NVIDIA CORPORATION licenses this file to you under
14+
* the Apache License, Version 2.0 (the "License"); you may
15+
* not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
*     http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing,
21+
* software distributed under the License is distributed on an
22+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
* KIND, either express or implied.  See the License for the
24+
* specific language governing permissions and limitations
25+
* under the License.
26+
*/
27+
28+
/*
29+
* Modifications Copyright The HAMi Authors. See
30+
* GitHub history for details.
1531
*/
1632

1733
package v1

pkg/nvidia-plugin/api/config/v1/consts.go

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
/*
2-
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The HAMi Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
/*
10+
* Licensed to NVIDIA CORPORATION under one or more contributor
11+
* license agreements. See the NOTICE file distributed with
12+
* this work for additional information regarding copyright
13+
* ownership. NVIDIA CORPORATION licenses this file to you under
14+
* the Apache License, Version 2.0 (the "License"); you may
15+
* not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
*     http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing,
21+
* software distributed under the License is distributed on an
22+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
* KIND, either express or implied.  See the License for the
24+
* specific language governing permissions and limitations
25+
* under the License.
26+
*/
27+
28+
/*
29+
* Modifications Copyright The HAMi Authors. See
30+
* GitHub history for details.
1531
*/
1632

1733
package v1

pkg/nvidia-plugin/api/config/v1/duration.go

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
/*
2-
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The HAMi Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
/*
10+
* Licensed to NVIDIA CORPORATION under one or more contributor
11+
* license agreements. See the NOTICE file distributed with
12+
* this work for additional information regarding copyright
13+
* ownership. NVIDIA CORPORATION licenses this file to you under
14+
* the Apache License, Version 2.0 (the "License"); you may
15+
* not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
*     http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing,
21+
* software distributed under the License is distributed on an
22+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
* KIND, either express or implied.  See the License for the
24+
* specific language governing permissions and limitations
25+
* under the License.
26+
*/
27+
28+
/*
29+
* Modifications Copyright The HAMi Authors. See
30+
* GitHub history for details.
1531
*/
1632

1733
package v1

pkg/nvidia-plugin/api/config/v1/flags.go

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
/*
2-
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The HAMi Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
/*
10+
* Licensed to NVIDIA CORPORATION under one or more contributor
11+
* license agreements. See the NOTICE file distributed with
12+
* this work for additional information regarding copyright
13+
* ownership. NVIDIA CORPORATION licenses this file to you under
14+
* the Apache License, Version 2.0 (the "License"); you may
15+
* not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
*     http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing,
21+
* software distributed under the License is distributed on an
22+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
* KIND, either express or implied.  See the License for the
24+
* specific language governing permissions and limitations
25+
* under the License.
26+
*/
27+
28+
/*
29+
* Modifications Copyright The HAMi Authors. See
30+
* GitHub history for details.
1531
*/
1632

1733
package v1

pkg/nvidia-plugin/api/config/v1/flags_test.go

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
/*
2-
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The HAMi Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
/*
10+
* Licensed to NVIDIA CORPORATION under one or more contributor
11+
* license agreements. See the NOTICE file distributed with
12+
* this work for additional information regarding copyright
13+
* ownership. NVIDIA CORPORATION licenses this file to you under
14+
* the Apache License, Version 2.0 (the "License"); you may
15+
* not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
*     http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing,
21+
* software distributed under the License is distributed on an
22+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
* KIND, either express or implied.  See the License for the
24+
* specific language governing permissions and limitations
25+
* under the License.
26+
*/
27+
28+
/*
29+
* Modifications Copyright The HAMi Authors. See
30+
* GitHub history for details.
1531
*/
1632

1733
package v1

pkg/nvidia-plugin/api/config/v1/replicas.go

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
/*
2-
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The HAMi Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
/*
10+
* Licensed to NVIDIA CORPORATION under one or more contributor
11+
* license agreements. See the NOTICE file distributed with
12+
* this work for additional information regarding copyright
13+
* ownership. NVIDIA CORPORATION licenses this file to you under
14+
* the Apache License, Version 2.0 (the "License"); you may
15+
* not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
*     http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing,
21+
* software distributed under the License is distributed on an
22+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
* KIND, either express or implied.  See the License for the
24+
* specific language governing permissions and limitations
25+
* under the License.
26+
*/
27+
28+
/*
29+
* Modifications Copyright The HAMi Authors. See
30+
* GitHub history for details.
1531
*/
1632

1733
package v1

pkg/nvidia-plugin/api/config/v1/replicas_test.go

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
/*
2-
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The HAMi Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
/*
10+
* Licensed to NVIDIA CORPORATION under one or more contributor
11+
* license agreements. See the NOTICE file distributed with
12+
* this work for additional information regarding copyright
13+
* ownership. NVIDIA CORPORATION licenses this file to you under
14+
* the Apache License, Version 2.0 (the "License"); you may
15+
* not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
*     http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing,
21+
* software distributed under the License is distributed on an
22+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
* KIND, either express or implied.  See the License for the
24+
* specific language governing permissions and limitations
25+
* under the License.
26+
*/
27+
28+
/*
29+
* Modifications Copyright The HAMi Authors. See
30+
* GitHub history for details.
1531
*/
1632

1733
package v1

0 commit comments

Comments
 (0)