mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-29 22:20:43 +00:00
Dockerfile: don't copy extraneous build assets to final image
This commit is contained in:
parent
b7a352aa8a
commit
efd0a956f8
1 changed files with 11 additions and 1 deletions
12
Dockerfile
12
Dockerfile
|
@ -81,7 +81,7 @@ RUN ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data
|
|||
###################################
|
||||
###################################
|
||||
|
||||
FROM builder
|
||||
FROM requirements
|
||||
|
||||
ARG FFMPEG
|
||||
|
||||
|
@ -93,6 +93,16 @@ RUN if [ "${FFMPEG}" = "true" ]; then \
|
|||
apt-get install -y ffmpeg \
|
||||
; fi
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# we start fresh & re-copy all assets because `make build` does not clean up nicely after itself
|
||||
# so when `entrypoint.sh` runs `make build` again (which it does by default), the build would fail
|
||||
# see https://github.com/go-skynet/LocalAI/pull/658#discussion_r1241971626 and
|
||||
# https://github.com/go-skynet/LocalAI/pull/434
|
||||
COPY . .
|
||||
RUN make prepare-sources
|
||||
COPY --from=builder /build/local-ai ./
|
||||
|
||||
# Define the health check command
|
||||
HEALTHCHECK --interval=1m --timeout=10m --retries=10 \
|
||||
CMD curl -f $HEALTHCHECK_ENDPOINT || exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue