Skip to content

Commit 83eabd7

Browse files
authored
ci: add CUDA Dockerfile (#1314)
1 parent 630ee03 commit 83eabd7

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162

163163
strategy:
164164
matrix:
165-
variant: [musa, sycl, vulkan]
165+
variant: [musa, sycl, vulkan, cuda]
166166

167167
env:
168168
REGISTRY: ghcr.io

Dockerfile.cuda

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ARG CUDA_VERSION=12.6.3
2+
ARG UBUNTU_VERSION=24.04
3+
4+
FROM nvidia/cuda:${CUDA_VERSION}-cudnn-devel-ubuntu${UBUNTU_VERSION} AS build
5+
6+
RUN apt-get update && apt-get install -y --no-install-recommends build-essential git ccache cmake
7+
8+
WORKDIR /sd.cpp
9+
10+
COPY . .
11+
12+
ARG CUDACXX=/usr/local/cuda/bin/nvcc
13+
RUN cmake . -B ./build -DSD_CUDA=ON
14+
RUN cmake --build ./build --config Release --parallel
15+
16+
FROM nvidia/cuda:${CUDA_VERSION}-cudnn-runtime-ubuntu${UBUNTU_VERSION} AS runtime
17+
18+
RUN apt-get update && \
19+
apt-get install --yes --no-install-recommends libgomp1 && \
20+
apt-get clean
21+
22+
COPY --from=build /sd.cpp/build/bin/sd-cli /sd-cli
23+
COPY --from=build /sd.cpp/build/bin/sd-server /sd-server
24+
25+
ENTRYPOINT [ "/sd-cli" ]

0 commit comments

Comments
 (0)