Start anaconda build module
Not currently tested pending AFS volume creation. Derives from EM/crYOLO.
This commit is contained in:
42
Programming/anaconda/build
Executable file
42
Programming/anaconda/build
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
pbuild::add_to_group 'Programming'
|
||||
pbuild::prep() {
|
||||
echo "prepping"
|
||||
source "${BUILDBLOCK_DIR}/files/config-$V.sh"
|
||||
|
||||
mkdir -p "$SRC_DIR"
|
||||
echo curl -fsSLo "$SRC_DIR/miniconda.sh" "https://repo.anaconda.com/miniconda/Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh"
|
||||
curl -fsSLo "$SRC_DIR/miniconda.sh" "https://repo.anaconda.com/miniconda/Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh"
|
||||
}
|
||||
|
||||
pbuild::configure() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::compile() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
source "${BUILDBLOCK_DIR}/files/config-$V.sh"
|
||||
|
||||
mkdir -p $PREFIX
|
||||
|
||||
# Install conda
|
||||
bash "$SRC_DIR/miniconda.sh" -b -p $PREFIX/conda
|
||||
|
||||
# Load conda
|
||||
source "$PREFIX/conda/etc/profile.d/conda.sh"
|
||||
|
||||
# Install anaconda versions
|
||||
for PY in "${PYTHON_VERSION[@]}"; do
|
||||
conda install -y anaconda=$V python=$PY
|
||||
done
|
||||
|
||||
# Deactivate
|
||||
source deactivate
|
||||
|
||||
# Unload conda;
|
||||
#unset $(set|sed -rn 's/^(_?conda[a-z_]*).*$/\1/pI');
|
||||
}
|
||||
9
Programming/anaconda/files/config-2018.12.sh
Normal file
9
Programming/anaconda/files/config-2018.12.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
# version-specific settings
|
||||
|
||||
# Miniconda version. Defaults to "latest"
|
||||
# Should match the version distributed with anaconda
|
||||
CONDA_VERSION=4.5.12
|
||||
|
||||
# List of python versions to install
|
||||
PYTHON_VERSIONS=(2.7)
|
||||
|
||||
2
Programming/anaconda/files/variants
Normal file
2
Programming/anaconda/files/variants
Normal file
@@ -0,0 +1,2 @@
|
||||
anaconda/2018.12 unstable
|
||||
|
||||
43
Programming/anaconda/modulefile
Normal file
43
Programming/anaconda/modulefile
Normal file
@@ -0,0 +1,43 @@
|
||||
#%Module
|
||||
|
||||
module-whatis "Anaconda software distribution and conda package manager"
|
||||
module-url "https://www.anaconda.com/"
|
||||
module-license "3-clause BSD License and 3rd party software licenses. https://docs.continuum.io/anaconda/eula/"
|
||||
module-maintainer "Spencer Bliven <spencer.bliven@psi.ch>"
|
||||
|
||||
module-help "
|
||||
Anaconda is a package manager, an environment manager, a Python/R data science distribution, and a collection of over 1,500+ open source packages. Anaconda is free and easy to install, and it offers free community support.
|
||||
|
||||
Conda is an open source package management system and environment management system that runs on Windows, macOS and Linux. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer. It was created for Python programs, but it can package and distribute software for any language.
|
||||
|
||||
Conda as a package manager helps you find and install packages. If you need a package that requires a different version of Python, you do not need to switch to a different environment manager, because conda is also an environment manager. With just a few commands, you can set up a totally separate environment to run that different version of Python, while continuing to run your usual version of Python in your normal environment.
|
||||
|
||||
This package provides the conda command (miniconda), as well as releases of the Anaconda distribution, built against several python versions.
|
||||
"
|
||||
|
||||
set dont-setenv { LD_LIBRARY_PATH }
|
||||
|
||||
# Check for supported shell types
|
||||
set shelltype [module-info shelltype]
|
||||
switch -- $shelltype {
|
||||
"sh" {
|
||||
}
|
||||
default {
|
||||
puts stderr "Shells of type '$shelltype' are NOT supported!"
|
||||
}
|
||||
}
|
||||
|
||||
switch [module-info mode] {
|
||||
"load" {
|
||||
puts stdout "source \"$PREFIX/conda/etc/profile.d/conda.sh\";\n"
|
||||
}
|
||||
"unload" -
|
||||
"remove" {
|
||||
# Deactivate
|
||||
puts stderr "which deactivate && source deactivate || source $PREFIX/conda/bin/deactivate;\n"
|
||||
|
||||
# Unload conda
|
||||
puts stdout {unset $(set|sed -rn 's/^(_?conda[a-z_]*).*$/\1/pI');}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user