forked from MegEngine/MegFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (29 loc) · 975 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM ubuntu:18.04
RUN apt update \
&& apt install -y curl \
&& apt install -y ffmpeg \
&& apt install -y yasm \
&& apt install -y clang \
&& apt install -y redis-server \
&& apt install -y python3 \
&& apt install -y python3-pip \
&& apt install -y git \
&& apt install -y build-essential
ENV CARGO_HOME /cargo
ENV RUSTUP_HOME /rustup
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -o run.sh \
&& chmod a+x run.sh \
&& ./run.sh -y && rm run.sh
ENV PATH $PATH:/cargo/bin
RUN chmod -R 777 /cargo /rustup
COPY ci/cargo-config /cargo/config
RUN mkdir -p $HOME/megflow-runspace
WORKDIR $HOME/megflow-runspace
COPY . $HOME/megflow-runspace/
RUN cargo build \
&& cd flow-python \
&& python3 setup.py install --user \
&& cd examples \
&& cargo run --example run_with_plugins -- -p logical_test
RUN cargo build --example run_with_plugins --release \
&& ln -s ../../target/release/examples/run_with_plugins