Skip to content

Commit

Permalink
Merge pull request #65 from isZumpo/docker-cache
Browse files Browse the repository at this point in the history
Enable incremental docker builds
  • Loading branch information
tphakala authored Mar 18, 2024
2 parents 76ea3c4 + 03acf2a commit 9acabf6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ RUN git clone --branch ${TENSORFLOW_VERSION} --depth 1 https://github.com/tensor

# Compile BirdNET-Go
COPY . BirdNET-Go
RUN cd BirdNET-Go && make TARGETPLATFORM=${TARGETPLATFORM}
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
cd BirdNET-Go && make TARGETPLATFORM=${TARGETPLATFORM}

# Create final image using a multi-platform base image
FROM debian:bookworm-slim
Expand All @@ -41,7 +43,6 @@ RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /root/src/BirdNET-Go/bin /usr/bin/
COPY --from=build /usr/local/lib/libtensorflowlite_c.so /usr/local/lib/
RUN ldconfig

Expand All @@ -55,5 +56,7 @@ WORKDIR /data
# Make port 8080 available to the world outside this container
EXPOSE 8080

COPY --from=build /root/src/BirdNET-Go/bin /usr/bin/

ENTRYPOINT ["/usr/bin/birdnet-go"]
CMD ["realtime"]

0 comments on commit 9acabf6

Please sign in to comment.