fix: docker multiplatform (#383)
* fix: multiplatform build * fix: test build
This commit is contained in:
committed by
GitHub
parent
6da9db489f
commit
497cb40aaf
@@ -15,13 +15,14 @@ RUN apt-get update -qqy && \
|
||||
cargo
|
||||
|
||||
# Setup args
|
||||
ARG ENABLE_GRAPHRAG=true
|
||||
ARG TARGETPLATFORM
|
||||
ARG TARGETARCH
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONIOENCODING=UTF-8
|
||||
ENV ENABLE_GRAPHRAG=${ENABLE_GRAPHRAG}
|
||||
ENV TARGETARCH=${TARGETARCH}
|
||||
|
||||
# Create working directory
|
||||
WORKDIR /app
|
||||
@@ -45,7 +46,7 @@ RUN --mount=type=ssh \
|
||||
|
||||
RUN --mount=type=ssh \
|
||||
--mount=type=cache,target=/root/.cache/pip \
|
||||
if [ "$ENABLE_GRAPHRAG" = "true" ]; then pip install graphrag future; fi
|
||||
if [ "$TARGETARCH" = "amd64" ]; then pip install graphrag future; fi
|
||||
|
||||
# Clean up
|
||||
RUN apt-get autoremove \
|
||||
|
Reference in New Issue
Block a user