forked from zpzim/SCAMP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (16 loc) · 797 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
FROM nvidia/cuda:12.3.1-devel-ubuntu20.04 AS base
RUN apt-get update && \
apt-get upgrade -y
# SCAMP build dependancies
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip zlib1g-dev cmake golang-go clang && pip install --no-input cmake
COPY . /SCAMP
# If a build directory already exists remove it
RUN rm -rf /SCAMP/build
# Build SCAMP
RUN mkdir /SCAMP/build && cd /SCAMP/build && cmake -DSCAMP_ENABLE_BINARY_DISTRIBUTION=1 -DBUILD_CLIENT_SERVER=1 -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. && make -j8
# We only need the CUDA runtime for the final container
FROM nvidia/cuda:12.3.1-runtime-ubuntu20.04
# Copy the SCAMP binaries and tests to the final container
RUN mkdir /SCAMP
COPY --from=0 /SCAMP/build /SCAMP/build
COPY --from=0 /SCAMP/test /SCAMP/test