mirror of
https://github.com/logos-co/SimulationsFramework.git
synced 2025-02-24 03:38:13 +00:00
35 lines
704 B
Docker
35 lines
704 B
Docker
|
# BUILD IMAGE --------------------------------------------------------
|
||
|
|
||
|
FROM rust as builder
|
||
|
|
||
|
# Update default packages
|
||
|
RUN apt-get update
|
||
|
|
||
|
# Get tools needed
|
||
|
RUN apt-get install -y git
|
||
|
|
||
|
# Get the simulation code
|
||
|
WORKDIR /rust-app
|
||
|
RUN git clone https://github.com/logos-co/consensus-research.git
|
||
|
|
||
|
# Compile it
|
||
|
WORKDIR /rust-app/consensus-research
|
||
|
RUN cargo build --profile release-opt --bin snow-family
|
||
|
|
||
|
|
||
|
# ACTUAL IMAGE ------------------------------------------------------
|
||
|
FROM python
|
||
|
|
||
|
COPY --from=builder /rust-app/consensus-research/target/release-opt/snow-family /usr/local/bin/snow-family
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY . .
|
||
|
|
||
|
RUN pip install -r requirements.txt
|
||
|
|
||
|
WORKDIR src
|
||
|
|
||
|
ENTRYPOINT ["python", "main.py"]
|
||
|
|
||
|
|