Skip to content

Commit 9022c33

Browse files
authored
Fixed painfully slow single process builds. (ggml-org#7326)
* Fixed painfully slow single process builds. * Added nproc for systems that don't default to nproc
1 parent 5921b8f commit 9022c33

9 files changed

+9
-9
lines changed

.devops/full-cuda.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ ENV LLAMA_CUDA=1
3131
# Enable cURL
3232
ENV LLAMA_CURL=1
3333

34-
RUN make
34+
RUN make -j$(nproc)
3535

3636
ENTRYPOINT ["/app/.devops/tools.sh"]

.devops/full-rocm.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ ENV LLAMA_CURL=1
4545
RUN apt-get update && \
4646
apt-get install -y libcurl4-openssl-dev
4747

48-
RUN make
48+
RUN make -j$(nproc)
4949

5050
ENTRYPOINT ["/app/.devops/tools.sh"]

.devops/full.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ COPY . .
1818
ENV LLAMA_CURL=1
1919

2020

21-
RUN make
21+
RUN make -j$(nproc)
2222

2323
ENV LC_ALL=C.utf8
2424

.devops/main-cuda.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
2323
# Enable CUDA
2424
ENV LLAMA_CUDA=1
2525

26-
RUN make
26+
RUN make -j$(nproc)
2727

2828
FROM ${BASE_CUDA_RUN_CONTAINER} as runtime
2929

.devops/main-rocm.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ ENV LLAMA_HIPBLAS=1
4040
ENV CC=/opt/rocm/llvm/bin/clang
4141
ENV CXX=/opt/rocm/llvm/bin/clang++
4242

43-
RUN make
43+
RUN make -j$(nproc)
4444

4545
ENTRYPOINT [ "/app/main" ]

.devops/main.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ WORKDIR /app
99

1010
COPY . .
1111

12-
RUN make
12+
RUN make -j$(nproc)
1313

1414
FROM ubuntu:$UBUNTU_VERSION as runtime
1515

.devops/server-cuda.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ENV LLAMA_CUDA=1
2525
# Enable cURL
2626
ENV LLAMA_CURL=1
2727

28-
RUN make
28+
RUN make -j$(nproc)
2929

3030
FROM ${BASE_CUDA_RUN_CONTAINER} as runtime
3131

.devops/server-rocm.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ ENV LLAMA_CURL=1
4545
RUN apt-get update && \
4646
apt-get install -y libcurl4-openssl-dev
4747

48-
RUN make
48+
RUN make -j$(nproc)
4949

5050
ENTRYPOINT [ "/app/server" ]

.devops/server.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COPY . .
1111

1212
ENV LLAMA_CURL=1
1313

14-
RUN make
14+
RUN make -j$(nproc)
1515

1616
FROM ubuntu:$UBUNTU_VERSION as runtime
1717

0 commit comments

Comments
 (0)