mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
build: update non root
This commit is contained in:
parent
d9fced691f
commit
22faa34440
1 changed files with 22 additions and 4 deletions
|
|
@ -12,16 +12,27 @@ WORKDIR /app
|
|||
USER root
|
||||
RUN apk add --no-cache \
|
||||
clang \
|
||||
clang-dev \
|
||||
llvm \
|
||||
llvm-dev \
|
||||
lld \
|
||||
gcc \
|
||||
g++ \
|
||||
linux-headers \
|
||||
build-base \
|
||||
bash \
|
||||
nodejs \
|
||||
npm \
|
||||
openssl-dev \
|
||||
&& pip install --no-cache-dir --upgrade pip build
|
||||
libffi-dev \
|
||||
musl-dev \
|
||||
pkgconfig \
|
||||
cmake \
|
||||
make \
|
||||
coreutils \
|
||||
perl \
|
||||
zlib-dev \
|
||||
&& pip install --no-cache-dir --upgrade pip build wheel setuptools cython
|
||||
|
||||
# Copy project files
|
||||
COPY . .
|
||||
|
|
@ -59,9 +70,16 @@ RUN cd /tmp/litellm_ui && \
|
|||
RUN cd /app/ui/litellm-dashboard && rm -rf ./out
|
||||
|
||||
# Build package and wheel dependencies
|
||||
# Use prebuilt binary wheels to avoid compilation issues with minimal toolchain
|
||||
ENV GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \
|
||||
GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
|
||||
# Set compiler environment variables for grpcio compilation
|
||||
ENV CC=clang \
|
||||
CXX=clang++ \
|
||||
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \
|
||||
GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1 \
|
||||
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
|
||||
PIP_PREFER_BINARY=1 \
|
||||
CFLAGS="-Wno-error" \
|
||||
CXXFLAGS="-Wno-error"
|
||||
|
||||
RUN rm -rf dist/* && python -m build && \
|
||||
pip install dist/*.whl && \
|
||||
pip wheel --no-cache-dir --wheel-dir=/wheels/ --prefer-binary -r requirements.txt
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue