Skip to content

Commit

Permalink
chore: add basic Dockerfile (#270)
Browse files Browse the repository at this point in the history
* chore: add basic Dockerfile

* WIP

* fixes

* switch to install

* rename file
  • Loading branch information
imrn99 authored Feb 3, 2025
1 parent b74f60e commit 180ac7f
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions benchmarks.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM rust:1.84 AS builder

WORKDIR /builder

# Copy files from the repo
COPY . .

# Install dependencuies
# RUN apt-get update

# Build binaries
RUN --mount=type=cache,target=/cargo CARGO_HOME=/cargo \
cargo install \
--path=benches \
--bins \
--root /builder/release
RUN --mount=type=cache,target=/cargo CARGO_HOME=/cargo \
cargo install \
--path=benches \
--bins \
--profile profiling \
--root /builder/profiling

# Use Ubuntu as the runtime image
FROM ubuntu:22.04

# Install performance tools
RUN apt-get update && apt-get install -y \
linux-tools-generic \
heaptrack

WORKDIR /honeycomb

# Fetch input meshes
# for some reason this doesn't resolve
# ADD https://github.com/imrn99/meshing-samples.git /honeycomb/meshes/

# Copy useful stuff
COPY --from=builder /builder/release/bin /honeycomb/rbin
COPY --from=builder /builder/profiling/bin /honeycomb/pbin

0 comments on commit 180ac7f

Please sign in to comment.