From 824f8671a3a59efa5993aa93c67877c99b84b2ac Mon Sep 17 00:00:00 2001 From: d3v-null Date: Wed, 25 Sep 2024 13:00:53 +0800 Subject: [PATCH] dockerfile part 4 --- Dockerfile | 105 ++++++++++++++++++++--------------------------------- 1 file changed, 40 insertions(+), 65 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f91170..da5ce2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,6 @@ RUN apt-get update && \ cython3 \ fontconfig \ g++ \ - git \ ipython3 \ jq \ lcov \ @@ -167,72 +166,48 @@ RUN git clone --depth 1 --branch=${AOFLAGGER_BRANCH} --recurse-submodules https: # set up aoflagger python library ENV PYTHONPATH="/usr/local/lib/:$PYTHONPATH" -ARG BIRLI_GIT=https://github.com/MWATelescope/Birli.git -ARG BIRLI_BRANCH=main -RUN cargo install birli --locked --git=${BIRLI_GIT} --branch=${BIRLI_BRANCH} && \ - rm -rf ${CARGO_HOME}/registry /opt/cargo/git/checkouts/ - -ARG HYPERBEAM_GIT=https://github.com/MWATelescope/mwa_hyperbeam.git -ARG HYPERBEAM_BRANCH=marlu0.14 -ARG HYPERBEAM_FEATURES=python -# This won't install the python library: -# RUN cargo install mwa_hyperbeam --locked --git=${HYPERBEAM_GIT} --branch=${HYPERBEAM_BRANCH} --features=${HYPERBEAM_FEATURES} && \ +# ARG BIRLI_GIT=https://github.com/MWATelescope/Birli.git +# ARG BIRLI_BRANCH=main +# RUN cargo install birli --locked --git=${BIRLI_GIT} --branch=${BIRLI_BRANCH} && \ # rm -rf ${CARGO_HOME}/registry /opt/cargo/git/checkouts/ -RUN git clone --depth 1 --branch=${HYPERBEAM_BRANCH} ${HYPERBEAM_GIT} /hyperbeam && \ - cd /hyperbeam && \ - maturin build --locked --release --features=${HYPERBEAM_FEATURES} && \ - python -m pip install $(ls -1 target/wheels/*.whl | tail -n 1) && \ - cd / && \ - rm -rf /hyperbeam ${CARGO_HOME}/registry - -ARG HYPERDRIVE_GIT=https://github.com/MWATelescope/mwa_hyperdrive.git -# # HACK: birli0.14 needs newer ndarray -# ARG HYPERDRIVE_BRANCH=main -ARG HYPERDRIVE_BRANCH=birli0.14 -# TODO: ARG HYPERDRIVE_FEATURES= ... --features=${HYPERDRIVE_FEATURES} -RUN cargo install mwa_hyperdrive --locked --git=${HYPERDRIVE_GIT} --branch=${HYPERDRIVE_BRANCH} && \ - rm -rf ${CARGO_HOME}/registry /opt/cargo/git/checkouts/ - -# # HACK: beam_fits deserves its own feature branch -# ARG HYPERDRIVE_BRANCH=marlu0.13 -# RUN git clone --depth 1 --branch=${HYPERDRIVE_BRANCH} https://github.com/MWATelescope/mwa_hyperdrive.git /hyperdrive && \ -# cd /hyperdrive && \ -# # mkdir -p src/hacks && \ -# # wget -Osrc/hacks/beam_fits.rs https://raw.githubusercontent.com/MWATelescope/mwa_hyperdrive/refs/heads/SDC3/src/hacks/beam_fits.rs && \ -# # wget -Osrc/hacks/mod.rs https://raw.githubusercontent.com/MWATelescope/mwa_hyperdrive/refs/heads/SDC3/src/hacks/mod.rs && \ -# # sed -i '/mod cli;/a pub mod hacks;' src/lib.rs && \ -# # cat src/lib.rs && \ -# # wget -Osrc/cli/mod.rs https://raw.githubusercontent.com/MWATelescope/mwa_hyperdrive/refs/heads/SDC3/src/cli/mod.rs && \ -# cargo install --path . --locked && \ + +# ARG HYPERBEAM_GIT=https://github.com/MWATelescope/mwa_hyperbeam.git +# ARG HYPERBEAM_BRANCH=marlu0.14 +# ARG HYPERBEAM_FEATURES=python +# # This won't install the python library: +# # RUN cargo install mwa_hyperbeam --locked --git=${HYPERBEAM_GIT} --branch=${HYPERBEAM_BRANCH} --features=${HYPERBEAM_FEATURES} && \ +# # rm -rf ${CARGO_HOME}/registry /opt/cargo/git/checkouts/ +# RUN git clone --depth 1 --branch=${HYPERBEAM_BRANCH} ${HYPERBEAM_GIT} /hyperbeam && \ +# cd /hyperbeam && \ +# maturin build --locked --release --features=${HYPERBEAM_FEATURES} && \ +# python -m pip install $(ls -1 target/wheels/*.whl | tail -n 1) && \ # cd / && \ -# rm -rf /hyperdrive ${CARGO_HOME}/registry - -# # download latest Leap_Second.dat, IERS finals2000A.all -RUN python -c "from astropy.time import Time; t=Time.now(); from astropy.utils.data import download_file; download_file('http://data.astropy.org/coordinates/sites.json', cache=True); print(t.gps, t.ut1)" - -# # finufft -# # RUN git clone https://github.com/flatironinstitute/finufft.git /finufft && \ -# # cd /finufft && \ -# # mkdir build && \ -# # cd build && \ -# # cmake $CMAKE_ARGS \ -# # -DENABLE_GUI=OFF \ -# # .. && \ -# # make install -j`nproc` - -# Copy the demo files -COPY ./demo /demo -ENV PATH="/demo:${PATH}" -WORKDIR /demo - -# HACK: the calibration fitting code in mwax_mover deserves its own public repo -FROM d3vnull0/mwax_mover:latest as mwax_mover -FROM base -# Copy files from the previous mwax_mover stage into the final image -COPY --from=mwax_mover /app /mwax_mover - -RUN cd /mwax_mover && \ - python -m pip install . +# rm -rf /hyperbeam ${CARGO_HOME}/registry + +# ARG HYPERDRIVE_GIT=https://github.com/MWATelescope/mwa_hyperdrive.git +# # # HACK: birli0.14 needs newer ndarray +# # ARG HYPERDRIVE_BRANCH=main +# ARG HYPERDRIVE_BRANCH=birli0.14 +# # TODO: ARG HYPERDRIVE_FEATURES= ... --features=${HYPERDRIVE_FEATURES} +# RUN cargo install mwa_hyperdrive --locked --git=${HYPERDRIVE_GIT} --branch=${HYPERDRIVE_BRANCH} && \ +# rm -rf ${CARGO_HOME}/registry /opt/cargo/git/checkouts/ + +# # # download latest Leap_Second.dat, IERS finals2000A.all +# RUN python -c "from astropy.time import Time; t=Time.now(); from astropy.utils.data import download_file; download_file('http://data.astropy.org/coordinates/sites.json', cache=True); print(t.gps, t.ut1)" + +# # Copy the demo files +# COPY ./demo /demo +# ENV PATH="/demo:${PATH}" +# WORKDIR /demo + +# # HACK: the calibration fitting code in mwax_mover deserves its own public repo +# FROM d3vnull0/mwax_mover:latest as mwax_mover +# FROM base +# # Copy files from the previous mwax_mover stage into the final image +# COPY --from=mwax_mover /app /mwax_mover + +# RUN cd /mwax_mover && \ +# python -m pip install . # # python /mwax_mover/scripts/cal_analysis.py \ # # --name "${name}" \