mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-30 06:30:43 +00:00
Dockerfile: preserve build dependencies in final image
so as to not break the `entrypoint.sh` script when `REBUILD!=false` and it calls `make build`
This commit is contained in:
parent
d045e12f6b
commit
b7a352aa8a
1 changed files with 7 additions and 6 deletions
13
Dockerfile
13
Dockerfile
|
@ -57,6 +57,9 @@ RUN curl -L "https://github.com/gabime/spdlog/archive/refs/tags/v${SPDLOG_VERSIO
|
||||||
# \
|
# \
|
||||||
# ; fi
|
# ; fi
|
||||||
|
|
||||||
|
###################################
|
||||||
|
###################################
|
||||||
|
|
||||||
FROM requirements as builder
|
FROM requirements as builder
|
||||||
|
|
||||||
ARG GO_TAGS="stablediffusion tts"
|
ARG GO_TAGS="stablediffusion tts"
|
||||||
|
@ -75,7 +78,10 @@ RUN make prepare
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build
|
RUN ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build
|
||||||
|
|
||||||
FROM requirements
|
###################################
|
||||||
|
###################################
|
||||||
|
|
||||||
|
FROM builder
|
||||||
|
|
||||||
ARG FFMPEG
|
ARG FFMPEG
|
||||||
|
|
||||||
|
@ -87,11 +93,6 @@ RUN if [ "${FFMPEG}" = "true" ]; then \
|
||||||
apt-get install -y ffmpeg \
|
apt-get install -y ffmpeg \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
COPY --from=builder /build/local-ai ./
|
|
||||||
COPY entrypoint.sh .
|
|
||||||
|
|
||||||
# Define the health check command
|
# Define the health check command
|
||||||
HEALTHCHECK --interval=1m --timeout=10m --retries=10 \
|
HEALTHCHECK --interval=1m --timeout=10m --retries=10 \
|
||||||
CMD curl -f $HEALTHCHECK_ENDPOINT || exit 1
|
CMD curl -f $HEALTHCHECK_ENDPOINT || exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue