Skip to content
Snippets Groups Projects
Commit 178ec574 authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

added miniconda based on cloud

parent ebd398d8
Branches
No related tags found
No related merge requests found
Bootstrap: library
From: mblaschek/imgw/ubuntu:18.04
%labels
APPLICATION_NAME miniconda3
APPLICATION_VERSION py39-4.9.2-Linux-x86_64
APPLICATION_URL https://docs.conda.io
AUTHOR_NAME Michael Blaschek
AUTHOR_EMAIL michael.blaschek@univie.ac.at
LAST_UPDATED 20211118
%setup
%environment
# Set the conda distribution type, its version number, the python
# version it utilizes, the root and installation directories where
# the distribution will be installed within the container, and the
# root URL to the installer
export CONDA_DISTRIBUTION='miniconda'
export CONDA_VERSION='3'
export CONDA_PYTHON_VERSION='py39'
export CONDA_INSTALLER_VERSION='4.9.2'
export CONDA_ARCH='Linux-x86_64'
export CONDA_INSTALL_DIR="/opt/${CONDA_DISTRIBUTION}${CONDA_VERSION}"
# Set PATH to conda distribution
export PATH="${CONDA_INSTALL_DIR}/bin:${PATH}"
%post -c /bin/bash
# Set operating system mirror URL
export MIRRORURL='http://at.archive.ubuntu.com/ubuntu'
# Set operating system version
export OSVERSION='bionic'
# Set system locale
export LC_ALL='C'
# Set debian frontend interface
export DEBIAN_FRONTEND='noninteractive'
# Upgrade all software packages to their latest versions
apt-get -y update && apt-get -y upgrade
cd /tmp
# Set the conda distribution type, its version number, the python
# version it utilizes, the root and installation directories where
# the distribution will be installed within the container, and the
# root URL to the installer
export CONDA_DISTRIBUTION='miniconda'
export CONDA_VERSION='3'
export CONDA_PYTHON_VERSION='py39'
export CONDA_INSTALLER_VERSION='4.9.2'
export CONDA_ARCH='Linux-x86_64'
export CONDA_INSTALLER="${CONDA_DISTRIBUTION^}${CONDA_VERSION}-${CONDA_PYTHON_VERSION}_${CONDA_INSTALLER_VERSION}-${CONDA_ARCH}.sh"
export CONDA_INSTALL_DIR="/opt/${CONDA_DISTRIBUTION}${CONDA_VERSION}"
export CONDA_ROOT_URL='https://repo.anaconda.com'
# Download and install conda distribution
wget "${CONDA_ROOT_URL}/${CONDA_DISTRIBUTION}/${CONDA_INSTALLER}"
chmod +x "${CONDA_INSTALLER}"
"./${CONDA_INSTALLER}" -b -p "${CONDA_INSTALL_DIR}"
# Remove conda installer
rm "${CONDA_INSTALLER}"
# Cleanup
apt-get -y autoremove --purge
apt-get -y clean
# Update database for mlocate
updatedb
%files
%runscript
%test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment