-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (37 loc) · 1.18 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM ubuntu:22.04
ENV SHELL=/bin/bash
ENV DEBIAN_FRONTEND noninteractive
ENV RUST_VERSION nightly-2023-05-03
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
ca-certificates \
build-essential \
curl \
g++-mips-linux-gnu \
libc6-dev-mips-cross \
llvm \
clang \
make \
cmake \
git \
python3 python3-venv python3-pip
RUN pip3 install wheel
ENV CC_mips_unknown_none=mips-linux-gnu-gcc \
CXX_mips_unknown_none=mips-linux-gnu-g++ \
CARGO_TARGET_MIPS_UNKNOWN_NONE_LINKER=mips-linux-gnu-gcc
#
# Install Rustup and Rust
#
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain ${RUST_VERSION} --component rust-src
ENV PATH="/root/.cargo/bin:${PATH}"
# Used for build caching
RUN cargo install cargo-chef --locked
WORKDIR /code
# note this is using the directory root as its context
COPY . .
WORKDIR /code/zipline-state-transition-mips
RUN git config --global --add safe.directory '*'
# Generate recipe
RUN cargo +${RUST_VERSION} chef prepare --recipe-path recipe.json
# # Download and build depdencies
RUN cargo +${RUST_VERSION} chef cook --release --recipe-path recipe.json
CMD ["/bin/bash", "build.sh"]