-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.backend
37 lines (29 loc) · 1.05 KB
/
Dockerfile.backend
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
FROM rust:latest
# uninstall old versions of llvm/clang
# RUN apt remove "*clang*"
# RUN apt remove "*llvm*"
# RUN apt remove "*mlir*"
# RUN apt remove "*polly*"
# install llvm 17
RUN apt update -y; apt upgrade -y
RUN apt install -y lsb-release wget software-properties-common gnupg
RUN wget https://apt.llvm.org/llvm.sh
RUN add-apt-repository -y 'deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-17 main'
RUN chmod +x ./llvm.sh; ./llvm.sh 17 all
RUN rm llvm.sh
# setup llvm 17 env including mlir
RUN ln /usr/bin/llvm-config-17 /usr/bin/llvm-config
RUN apt install -y libmlir-17-dev mlir-17-tools
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY conq-er/Cargo.toml ./conq-er/
COPY conqiler/Cargo.toml ./conqiler/
COPY test-server/Cargo.toml ./test-server/
RUN mkdir ./conq-er/src; echo 'fn main() {}' > ./conq-er/src/main.rs
RUN mkdir ./conqiler/src; echo 'fn main() {}' > ./conqiler/src/main.rs
RUN mkdir ./test-server/src; echo 'fn main() {}' > ./test-server/src/main.rs
RUN cargo build
COPY . .
RUN cargo build
EXPOSE 7878
CMD ["./target/debug/test-server"]