Added Dockerfile

This commit is contained in:
Alberto Soutullo Rendo 2022-11-18 10:50:40 +01:00
parent ffe4c7dfe8
commit c73b520a10
1 changed files with 34 additions and 0 deletions

34
Dockerfile Normal file
View File

@ -0,0 +1,34 @@
# 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"]