FROM golang:1.25 as build-go
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y git
WORKDIR /build
RUN git clone https://github.com/jech/galene \
&& cd galene \
&& CGO_ENABLED=0 go build -ldflags='-s -w'
RUN mkdir /app
RUN mv /build/galene/galene /app/
RUN mv /build/galene/static /app/
FROM node:25 as build-node
COPY --from=build-go /app /app
WORKDIR /app
RUN mkdir mediapipe \
&& cd mediapipe \
&& npm pack @mediapipe/tasks-vision \
&& tar xzf mediapipe-tasks-vision-*.tgz \
&& rm -f ../static/third-party/tasks-vision \
&& mv package ../static/third-party/tasks-vision \
&& chmod -R o+r ../static/third-party/tasks-vision \
&& cd ../static/third-party/tasks-vision \
&& mkdir models \
&& cd models \
&& wget https://storage.googleapis.com/mediapipe-models/image_segmenter/selfie_segmenter/float16/latest/selfie_segmenter.tflite \
&& cd ../../../../ \
&& rm -r mediapipe
FROM scratch
COPY --from=build-node /app /app
WORKDIR /app
ENTRYPOINT ["/app/galene"]
Content type
Image
Digest
sha256:de1b73693…
Size
11.4 MB
Last updated
10 months ago
docker pull oza6ut0ne/galene