Created
September 10, 2024 04:49
-
-
Save d3v-null/8218e867456ccd9ceae4880e0bc0dfb3 to your computer and use it in GitHub Desktop.
WIP BIPP - Bluebild Imager ++ Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:1 | |
# cross-platform, cpu-only dockerfile for demoing MWA software stack | |
# on amd64, arm64 | |
# ref: https://docs.docker.com/build/building/multi-platform/ | |
ARG BASE_IMG="ubuntu:24.04" | |
FROM ${BASE_IMG} as base | |
# Suppress perl locale errors | |
ENV LC_ALL=C | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
build-essential \ | |
ca-certificates \ | |
cmake \ | |
git \ | |
libblas-dev \ | |
liblapack-dev \ | |
libfftw3-dev \ | |
libgomp1 \ | |
pkg-config \ | |
python3-astropy \ | |
python3-dev \ | |
python3-healpy \ | |
python3-matplotlib \ | |
python3-numpy \ | |
python3-pandas \ | |
python3-pip \ | |
python3-pyproj \ | |
python3-scipy \ | |
python3-tqdm \ | |
&& \ | |
apt-get clean all && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | |
apt-get -y autoremove | |
# use python3 as the default python | |
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ | |
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 | |
# finufft | |
# --install-prefix /path/to/install | |
RUN git clone --depth 1 https://github.com/flatironinstitute/finufft.git /finufft && \ | |
cd /finufft && \ | |
cmake -S . -B build -DFINUFFT_BUILD_TESTS=ON && \ | |
cmake --build build && \ | |
ctest --test-dir build && \ | |
cmake --install build && \ | |
pip install --break-system-packages python/finufft | |
# cd .. && \ | |
# rm -rf /finufft | |
# -DCMAKE_INSTALL_PREFIX=/usr/local | |
# using Shreyam's fork instead of https://github.com/epfl-radio-astro/bipp.git | |
RUN git clone --depth 1 https://github.com/shreyamkrishna/bipp.git /bipp && \ | |
cd /bipp && \ | |
mkdir build && \ | |
cd build && \ | |
cmake .. -DBIPP_PYTHON=ON -DBIPP_INSTALL=PYTHON && \ | |
make -j`nproc` install && \ | |
chmod +x ../examples/real_data/MWA_nufft.py | |
# cd .. && \ | |
# rm -rf /bipp | |
ENV PYTHONPATH="/usr/local/bipp/:$PYTHONPATH" | |
RUN python -c 'import pybipp' | |
# Traceback (most recent call last): | |
# File "<stdin>", line 1, in <module> | |
# ImportError: /usr/local/bipp/_libs/libbipp.so.0: undefined symbol: fftwf_plan_with_nthreads | |
RUN python /bipp/examples/real_data/MWA_nufft.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment