/ Dockerfile
Dockerfile
 1  # BUILD IMAGE --------------------------------------------------------
 2  
 3  FROM rust as builder
 4  
 5  # Update default packages
 6  RUN apt-get update
 7  
 8  # Get tools needed
 9  RUN apt-get install -y git
10  
11  # Get the simulation code
12  WORKDIR /rust-app
13  RUN git clone https://github.com/logos-co/consensus-research.git
14  
15  # Compile it
16  WORKDIR /rust-app/consensus-research
17  RUN cargo build --profile release-opt --bin snow-family
18  
19  
20  # ACTUAL IMAGE ------------------------------------------------------
21  FROM python
22  
23  COPY --from=builder /rust-app/consensus-research/target/release-opt/snow-family /usr/local/bin/snow-family
24  
25  WORKDIR /app
26  COPY . .
27  
28  RUN pip install -r requirements.txt
29  
30  ENV PYTHONPATH "${PYTHONPATH}:src"
31  
32  ENTRYPOINT ["python", "src/main.py"]
33  
34