Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions benchmarker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
FROM golang:1.24-alpine AS builder
RUN apk add --no-cache build-base hdf5-dev gcc libc-dev python3 bash g++ musl-dev make cmake
### BUILDER STAGE ###
FROM golang:1.24-bookworm AS builder
# or: FROM golang:1.24-ubuntu24.04

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libhdf5-dev \
python3 \
bash \
cmake \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY . .

# Enable CGO so HDF5 links correctly
RUN CGO_ENABLED=1 go build -o benchmarker .

FROM golang:1.24-alpine
RUN apk add --no-cache hdf5-dev python3 bash

### RUNTIME STAGE ###
FROM debian:bookworm-slim
# or: FROM ubuntu:24.04

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libhdf5-103 \
python3 \
bash \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY --from=builder /app/benchmarker /app/benchmarker
COPY --from=builder /app/scripts/ /app/scripts/
CMD ["/app/benchmarker"]

CMD ["/app/benchmarker"]
Loading