Implements SPEC.md: two listeners, one writer-preferring two-mode lock, Ollama unload before image jobs, ComfyUI history polling + VRAM free, optional model warm-up, healthz/metrics endpoints, streaming-safe reverse proxies, Dockerfile and Gitea Actions CI.
14 lines
337 B
Docker
14 lines
337 B
Docker
FROM golang:1.23 AS build
|
|
WORKDIR /src
|
|
COPY go.mod ./
|
|
COPY cmd ./cmd
|
|
COPY internal ./internal
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION}" -o /gpulock ./cmd/gpulock
|
|
|
|
FROM gcr.io/distroless/static:nonroot
|
|
COPY --from=build /gpulock /gpulock
|
|
EXPOSE 8189 11435
|
|
USER nonroot
|
|
ENTRYPOINT ["/gpulock"]
|