-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile.github-dev
40 lines (32 loc) · 1.14 KB
/
Dockerfile.github-dev
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
35
36
37
38
39
40
FROM ubuntu:18.04
WORKDIR /megflow
# install requirements
RUN apt-get update
RUN apt-get install -y wget yasm clang git build-essential
RUN apt install -y libssl-dev
RUN apt update && apt-get install -y pkg-config --fix-missing
RUN apt-get install -y curl
RUN apt install -y libv4l-dev liblzma-dev
# prepare cargo env
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.github /cargo/config
# copy workspace
RUN mkdir -p $HOME/megflow-runspace
WORKDIR $HOME/megflow-runspace
# build conda env and activate
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
RUN bash Miniconda3-latest-Linux-x86_64.sh -b -p /conda && rm Miniconda3-latest-Linux-x86_64.sh
ENV PATH $PATH:/conda/bin
RUN echo "PATH=${PATH}" >> ~/.bashrc
RUN conda init
COPY . $HOME/megflow-runspace/
# python install
RUN cd flow-python && python3 setup.py install --user
RUN export PATH=/root/.local/bin:${PATH} && cd flow-python/examples \
&& megflow_run -p logical_test