diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index 21891b0..f1e61a0 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -35,7 +35,13 @@ RUN apt-get update > /dev/null && \ find ${CONDA_DIR} -follow -type f -name '*.pyc' -delete && \ conda clean --force-pkgs-dirs --all --yes && \ echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> /etc/skel/.bashrc && \ - echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> ~/.bashrc + echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> ~/.bashrc && \ + if [ ${MINIFORGE_NAME} = "Mambaforge"* ]; then \ + echo '. ${CONDA_DIR}/etc/.mambaforge_deprecation.sh' >> /etc/skel/.bashrc && \ + echo '. ${CONDA_DIR}/etc/.mambaforge_deprecation.sh' >> ~/.bashrc; \ + fi + +COPY ubuntu/mambaforge_deprecation.sh ${CONDA_DIR}/etc/.mambaforge_deprecation.sh ENTRYPOINT ["tini", "--"] CMD [ "/bin/bash" ] diff --git a/ubuntu/mambaforge_deprecation.sh b/ubuntu/mambaforge_deprecation.sh new file mode 100644 index 0000000..c066339 --- /dev/null +++ b/ubuntu/mambaforge_deprecation.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if [[ "$GITHUB_ACTIONS" == "true" ]]; then + echo "::warning title=Mambaforge is now deprecated!::Future Miniforge releases will NOT build Mambaforge installers. We advise you switch to Miniforge at your earliest convenience. More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/." +else + echo "!!!!!! Mambaforge is now deprecated !!!!!" + echo "Future Miniforge releases will NOT build Mambaforge installers." + echo "We advise you switch to Miniforge at your earliest convenience." + echo "More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/." +fi + +case $(date +%F) in + # Brownouts + 2024-10-01|2024-10-15|2024-11-01|2024-11-10|2024-11-20|2024-11-30|2024-12-05|2024-12-10|2024-12-15|2024-12-20|2024-12-25|2024-12-30|2024-12-31|2025-*) + exit 1 + ;; + *) + echo "Sleeping for 300s..." + for i in {1..10}; do print "."; done + ;; +esac