-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (63 loc) · 2.03 KB
/
Dockerfile
File metadata and controls
69 lines (63 loc) · 2.03 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
58
59
60
61
62
63
64
65
66
67
68
69
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
# Set environment variables
ENV PATH=/usr/local/cuda/bin${PATH:+:${PATH}} \
LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} \
DEBIAN_FRONTEND=noninteractive
# Install system dependencies and build tools
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
python3-dev \
python3-pip \
python3-wheel \
python3-setuptools \
build-essential \
cmake \
gfortran \
g++ \
libncurses5-dev \
libreadline-dev \
flex \
bison \
libblas-dev \
liblapacke-dev \
libcfitsio-dev \
wcslib-dev \
libfftw3-dev \
libhdf5-serial-dev \
python3-numpy \
libboost-all-dev \
libgsl-dev && \
rm -rf /var/lib/apt/lists/*
# Install casacore
RUN git clone --single-branch --branch v3.5.0 --depth 1 \
https://github.com/casacore/casacore.git /tmp/casacore && \
cd /tmp/casacore && \
mkdir build && cd build && \
cmake -DUSE_FFTW3=ON \
-DUSE_OPENMP=ON \
-DUSE_HDF5=ON \
-DBUILD_PYTHON3=ON \
-DUSE_THREADS=ON \
-DBUILD_PYTHON=OFF \
.. && \
make -j$(nproc) && \
make install && \
cd / && rm -rf /tmp/casacore
# Install CUDA samples (required for common headers)
RUN cd /usr/local/cuda && \
git clone --single-branch --branch v12.4 --depth 1 \
https://github.com/NVIDIA/cuda-samples.git samples && \
cd samples && \
mv Common common && \
mv Samples samples && \
cd common && \
mkdir -p inc && \
mv *.h inc/ 2>/dev/null || true
# Verify CUDA installation
RUN nvcc --version && \
test -f /usr/local/cuda/bin/nvcc && \
test -d /usr/local/cuda/lib64 && \
echo "CUDA installation verified successfully"
LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/gpuvmem" \
org.opencontainers.image.description="Base image for gpuvmem with CUDA 12.4.1 and casacore"