Skip to content

Commit

Permalink
Harden build of libsodium
Browse files Browse the repository at this point in the history
Libsodium is being built with default CFLAGS. This adds optimization on par
with cmake release builds. It also adds security hardening flags suggested
for RHEL 9 to protect against various issues.
  • Loading branch information
stevegrubb authored and dtrifiro committed Sep 12, 2024
1 parent 6bd8a4c commit 956ef7a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ RUN curl -LO https://github.com/jedisct1/libsodium/releases/download/${LIBSODIUM
&& rm -f libsodium*.tar.gz \
&& mv libsodium*/* ./

RUN ./configure --prefix="/usr/" && make && make check
RUN CFLAGS="-O3 -Wall -Werror=format-security -Wno-unused-function -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection"\
./configure --prefix="/usr/" && make -j $MAX_JOBS && make check

## Release #####################################################################
FROM python-install AS vllm-openai
Expand Down Expand Up @@ -220,5 +221,7 @@ ENV GRPC_PORT=8033 \
# see: https://github.com/vllm-project/vllm/pull/6485
DISABLE_LOGPROBS_DURING_SPEC_DECODING=false

USER 2000
ENTRYPOINT ["python3", "-m", "vllm_tgis_adapter", "--uvicorn-log-level=warning"]
#USER 2000
#ENTRYPOINT ["python3", "-m", "vllm_tgis_adapter", "--uvicorn-log-level=warning"]
USER root
ENTRYPOINT ["/bin/sh" ]

0 comments on commit 956ef7a

Please sign in to comment.