# ----------------------------------------------------------------------------------------- # Step 1 : Import a base image from online repository # FROM nvidia/cuda:12.5.0-devel-ubuntu22.04 FROM nvidia/cuda:12.4.0-devel-ubuntu22.04 # ----------------------------------------------------------------------------------------- # Step 2 : Suppress Interactive Prompts from Debian ENV DEBIAN_FRONTEND=noninteractive # ----------------------------------------------------------------------------------------- # Step 3 : Installing required packages and setting up environment variables # Update system and install libraries RUN apt-get update && apt-get install -y \ build-essential \ cmake \ gfortran \ libopenblas-dev \ liblapack-dev \ libfftw3-dev \ libmetis-dev \ libvtk7-dev \ libgomp1 \ libomp-dev \ libblas-dev \ libpthread-stubs0-dev \ && rm -rf /var/lib/apt/lists/* # Install Compilers RUN apt-get update && apt-get install -y g++ gcc # Install Python and pip RUN apt-get install -y python3 python3-pip # Copy current directory to docker image WORKDIR dgtd COPY . . # Install Python dependencies RUN pip install --no-cache-dir -v -r /dgtd/requirements.txt # Set Path for libraries and CUDA ENV CUDA_HOME /usr/local/cuda ENV LD_LIBRARY_PATH ${CUDA_HOME}/lib64 ENV PATH ${CUDA_HOME}/:bin:${PATH} ENV CPATH ${CUDA_HOME}/include:${CPATH} ENV CUDACXX ${CUDA_HOME}/bin/nvcc # ----------------------------------------------------------------------------------------- # Step 4 : Compiling Program # WORKDIR ${DIR}/dgtd_gpu RUN ls -l && mkdir build && cd build && cmake .. && make -j 4 CMD ["bash"] #ENTRYPOINT ["./runCUDA.sh"]