Skip to content

Commit 0a1d889

Browse files
elepedusggerganov
andauthored
server: add cURL support to server Dockerfiles (ggml-org#6474)
* server: add cURL support to `full.Dockerfile` * server: add cURL support to `full-cuda.Dockerfile` and `server-cuda.Dockerfile` * server: add cURL support to `full-rocm.Dockerfile` and `server-rocm.Dockerfile` * server: add cURL support to `server-intel.Dockerfile` * server: add cURL support to `server-vulkan.Dockerfile` * fix typo in `server-vulkan.Dockerfile` Co-authored-by: Georgi Gerganov <[email protected]> --------- Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 7dda1b7 commit 0a1d889

7 files changed

+33
-6
lines changed

.devops/full-cuda.Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM ${BASE_CUDA_DEV_CONTAINER} as build
1212
ARG CUDA_DOCKER_ARCH=all
1313

1414
RUN apt-get update && \
15-
apt-get install -y build-essential python3 python3-pip git
15+
apt-get install -y build-essential python3 python3-pip git libcurl4-openssl-dev
1616

1717
COPY requirements.txt requirements.txt
1818
COPY requirements requirements
@@ -28,6 +28,8 @@ COPY . .
2828
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
2929
# Enable CUDA
3030
ENV LLAMA_CUDA=1
31+
# Enable cURL
32+
ENV LLAMA_CURL=1
3133

3234
RUN make
3335

.devops/full-rocm.Dockerfile

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

43+
# Enable cURL
44+
ENV LLAMA_CURL=1
45+
RUN apt-get update && \
46+
apt-get install -y libcurl4-openssl-dev
47+
4348
RUN make
4449

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

.devops/full.Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG UBUNTU_VERSION=22.04
33
FROM ubuntu:$UBUNTU_VERSION as build
44

55
RUN apt-get update && \
6-
apt-get install -y build-essential python3 python3-pip git
6+
apt-get install -y build-essential python3 python3-pip git libcurl4-openssl-dev
77

88
COPY requirements.txt requirements.txt
99
COPY requirements requirements
@@ -15,6 +15,9 @@ WORKDIR /app
1515

1616
COPY . .
1717

18+
ENV LLAMA_CURL=1
19+
20+
1821
RUN make
1922

2023
ENV LC_ALL=C.utf8

.devops/server-cuda.Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM ${BASE_CUDA_DEV_CONTAINER} as build
1212
ARG CUDA_DOCKER_ARCH=all
1313

1414
RUN apt-get update && \
15-
apt-get install -y build-essential git
15+
apt-get install -y build-essential git libcurl4-openssl-dev
1616

1717
WORKDIR /app
1818

@@ -22,11 +22,16 @@ COPY . .
2222
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
2323
# Enable CUDA
2424
ENV LLAMA_CUDA=1
25+
# Enable cURL
26+
ENV LLAMA_CURL=1
2527

2628
RUN make
2729

2830
FROM ${BASE_CUDA_RUN_CONTAINER} as runtime
2931

32+
RUN apt-get update && \
33+
apt-get install -y libcurl4-openssl-dev
34+
3035
COPY --from=build /app/server /server
3136

3237
ENTRYPOINT [ "/server" ]

.devops/server-intel.Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM intel/oneapi-basekit:$ONEAPI_VERSION as build
44

55
ARG LLAMA_SYCL_F16=OFF
66
RUN apt-get update && \
7-
apt-get install -y git
7+
apt-get install -y git libcurl4-openssl-dev
88

99
WORKDIR /app
1010

@@ -16,11 +16,14 @@ RUN mkdir build && \
1616
echo "LLAMA_SYCL_F16 is set" && \
1717
export OPT_SYCL_F16="-DLLAMA_SYCL_F16=ON"; \
1818
fi && \
19-
cmake .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ${OPT_SYCL_F16} && \
19+
cmake .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DLLAMA_CURL=ON ${OPT_SYCL_F16} && \
2020
cmake --build . --config Release --target server
2121

2222
FROM intel/oneapi-basekit:$ONEAPI_VERSION as runtime
2323

24+
RUN apt-get update && \
25+
apt-get install -y libcurl4-openssl-dev
26+
2427
COPY --from=build /app/build/bin/server /server
2528

2629
ENV LC_ALL=C.utf8

.devops/server-rocm.Dockerfile

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

43+
# Enable cURL
44+
ENV LLAMA_CURL=1
45+
RUN apt-get update && \
46+
apt-get install -y libcurl4-openssl-dev
47+
4348
RUN make
4449

4550
ENTRYPOINT [ "/app/server" ]

.devops/server-vulkan.Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key
1111
apt update -y && \
1212
apt-get install -y vulkan-sdk
1313

14+
# Install cURL
15+
RUN apt-get update && \
16+
apt-get install -y libcurl4-openssl-dev
17+
1418
# Build it
1519
WORKDIR /app
1620
COPY . .
1721
RUN mkdir build && \
1822
cd build && \
19-
cmake .. -DLLAMA_VULKAN=1 && \
23+
cmake .. -DLLAMA_VULKAN=1 -DLLAMA_CURL=1 && \
2024
cmake --build . --config Release --target server
2125

2226
# Clean up

0 commit comments

Comments
 (0)