-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add basic Dockerfile * WIP * fixes * switch to install * rename file
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |