Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3bdfb5c

Browse files
committed
Docker: Optimise cmake build commands
Introduces cmake parallel buildSeeleejet#852
1 parent856f621 commit3bdfb5c

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

‎Dockerfile.rocm‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ ENV PATH="/opt/rocm/lib/llvm/bin:$PATH"
1212

1313
WORKDIR /sd.cpp
1414
COPY . .
15-
1615
ARG GFX_NAME
17-
RUN mkdir -p build \
18-
&& cd build \
19-
&& cmake .. \
16+
RUN cmake . -B ./build \
2017
-G "Ninja" \
2118
-DCMAKE_C_COMPILER=clang \
2219
-DCMAKE_CXX_COMPILER=clang++ \
@@ -25,8 +22,8 @@ RUN mkdir -p build \
2522
-DGPU_TARGETS=$GFX_NAME \
2623
-DAMDGPU_TARGETS=$GFX_NAME \
2724
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
28-
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
29-
&&cmake --build . --config Release
25+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
26+
RUNcmake --build ./build --config Release --parallel
3027

3128
FROM rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete AS runtime
3229

‎Dockerfile.vulkan‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ ENV VK_LAYER_PATH="/vulkansdk/x86_64/share/vulkan/explicit_layer.d"
1717

1818
WORKDIR /sd.cpp
1919
COPY . .
20-
RUN mkdir -p build \
21-
&& cd build \
22-
&& cmake .. -DSD_VULKAN=ON \
23-
&& cmake --build . --config Release
20+
RUN cmake . -B ./build -DSD_VULKAN=ON
21+
RUN cmake --build ./build --config Release --parallel
2422

2523
FROM debian:trixie-slim AS runtime
2624

27-
RUN apt-get update && apt-get install -y mesa-vulkan-drivers vulkan-tools libgomp1
25+
RUN apt-get update \
26+
&& apt-get install -y mesa-vulkan-drivers vulkan-tools libgomp1 \
27+
&& apt-get clean
2828

2929
COPY --from=build /sd.cpp/build/bin/sd /sd
3030

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp