Added Dockerfile
This commit is contained in:
parent
ffe4c7dfe8
commit
c73b520a10
|
@ -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"]
|
||||
|
||||
|
Loading…
Reference in New Issue