Last active
March 7, 2024 09:50
-
-
Save maurerle/46959dbcbbd4c890523fe46d96bc1e72 to your computer and use it in GitHub Desktop.
Installation script for miniconda using the deb package - look at https://github.com/tartansandal/conda-bash-completion for autocompletion
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
#!/bin/bash | |
set -e | |
# Check for root priviliges | |
if [[ $EUID -ne 0 ]]; then | |
printf "Please run as root:\nsudo %s\n" "${0}" | |
exit 1 | |
fi | |
# for more information look here: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html | |
# Install our public GPG key to trusted store | |
curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg | |
install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg | |
# Check whether fingerprint is correct (will output an error message otherwise) | |
gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 | |
# Add our Debian repo | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list | |
apt update | |
apt install conda | |
echo "source /opt/conda/etc/profile.d/conda.sh" >> /etc/bash.bashrc | |
echo "auto_activate_base: false" >> /opt/conda/.condarc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment