|
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 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. |
| 15 | + |
| 16 | +FROM nvcr.io/nvidia/cuda:12.8.1-base-ubuntu22.04 AS builder |
| 17 | + |
| 18 | +ENV DEBIAN_FRONTEND=noninteractive |
| 19 | +RUN apt-get update -y && apt-get install -y --no-install-recommends \ |
| 20 | + wget \ |
| 21 | + && \ |
| 22 | + rm -rf /var/lib/apt/lists/* |
| 23 | + |
| 24 | +# See instructions from https://vulkan.lunarg.com/doc/sdk/1.4.309.0/linux/getting_started_ubuntu.html |
| 25 | +RUN wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc \ |
| 26 | + && \ |
| 27 | + wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list \ |
| 28 | + && \ |
| 29 | + apt update -y \ |
| 30 | + && \ |
| 31 | + apt install -y --no-install-recommends vulkan-sdk \ |
| 32 | + && \ |
| 33 | + rm -rf /var/lib/apt/lists/* |
| 34 | + |
| 35 | +# TODO: Should we include this in the list above. |
| 36 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 37 | + git \ |
| 38 | + make \ |
| 39 | + cmake \ |
| 40 | + pkg-config \ |
| 41 | + gcc \ |
| 42 | + g++ \ |
| 43 | + && rm -rf /var/lib/apt/lists/* |
| 44 | + |
| 45 | +WORKDIR /build |
| 46 | + |
| 47 | +ARG BUILD_EXAMPLES="computeheadless renderheadless" |
| 48 | +ENV BUILD_EXAMPLES=$BUILD_EXAMPLES |
| 49 | + |
| 50 | +# TODO: We should update to the official samples |
| 51 | +RUN git clone --recursive https://github.com/SaschaWillems/Vulkan.git \ |
| 52 | + && cd Vulkan && mkdir -p build && cd build \ |
| 53 | + && cmake .. \ |
| 54 | + && make ${BUILD_EXAMPLES} |
| 55 | + |
0 commit comments