-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (48 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
57 lines (48 loc) · 1.56 KB
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
52
53
54
55
56
57
# Use NVIDIA CUDA base image
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
# Set non-interactive mode for apt-get to avoid prompts
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
# Install necessary packages
RUN apt-get update && \
apt-get clean && \
apt-get install -y \
wget \
python3-pip \
git \
libeigen3-dev \
libboost-all-dev \
gcc \
g++ \
cmake
# Install CUDA 12.x
RUN echo "Checking and installing CUDA 12.x..."
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
RUN dpkg -i cuda-keyring_1.1-1_all.deb
RUN apt-get update -y
RUN apt-get -y install cuda-toolkit-12-4
ENV PATH=/usr/local/cuda/bin:$PATH
ENV CUDADIR=/usr/local/cuda
ENV CXXFLAGS="-I/usr/local/cuda/include $CXXFLAGS"
ENV LDFLAGS="-L/usr/local/cuda/lib64 $LDFLAGS"
# Set the working directory
WORKDIR /app
# Copy the repository from the build context to the container
RUN mkdir -p /app/stormm
COPY . /app/stormm
# Build STORMM using CMake with CUDA enabled
RUN cmake -S stormm -B stormmbuild \
-DSTORMM_ENABLE_CUDA=YES \
-DSTORMM_ENABLE_RDKIT=NO \
-DCUSTOM_GPU_ARCH=89
ENV STORMM_HOME=/app/stormm
ENV STORMM_SOURCE=/app/stormm
ENV STORMM_BUILD=/app/stormmbuild
WORKDIR /app/stormmbuild
RUN make -j
# After building all apps
COPY entrypoint /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint
# Set the default command to run bash
RUN echo "To run this container with GPU support, use the --gpus flag with docker run (e.g. docker run --gpus all stormm-config)"
ENTRYPOINT ["/usr/local/bin/entrypoint"]