mingyang91 commited on
Commit
dc74add
·
verified ·
1 Parent(s): 77262d6

add CUDA11.4.Dockerfile

Browse files
Files changed (1) hide show
  1. CUDA11.4.Dockerfile +25 -0
CUDA11.4.Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.4.3-devel-ubuntu20.04 as chef
2
+ RUN apt-get update && apt-get install -y curl
3
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
4
+ ENV PATH=/root/.cargo/bin:$PATH
5
+ RUN cargo install cargo-chef
6
+ WORKDIR /app
7
+
8
+ FROM chef as planner
9
+ COPY . .
10
+ RUN cargo chef prepare --recipe-path recipe.json
11
+
12
+ FROM chef as builder
13
+ ENV DEBIAN_FRONTEND=noninteractive
14
+ RUN apt-get update && apt-get install -y cmake g++ libclang-dev libssl-dev pkg-config python3-dev
15
+ COPY --from=planner /app/recipe.json recipe.json
16
+ RUN cargo chef cook --release --recipe-path recipe.json
17
+ COPY . .
18
+ RUN cargo build --release
19
+
20
+ FROM nvidia/cuda:11.4.3-runtime-ubuntu20.04 as runtime
21
+
22
+ RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
23
+ WORKDIR /app
24
+ COPY --from=builder /app/target/release/polyhedron .
25
+ ENTRYPOINT ["./polyhedron"]