SimulationsFramework/Dockerfile

35 lines
731 B
Docker
Raw Permalink Normal View History

2022-11-18 09:50:40 +00:00
# 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
2022-11-18 13:46:07 +00:00
ENV PYTHONPATH "${PYTHONPATH}:src"
2022-11-18 09:50:40 +00:00
2022-11-18 13:46:07 +00:00
ENTRYPOINT ["python", "src/main.py"]
2022-11-18 09:50:40 +00:00