Skip to content

Commit

Permalink
Merge pull request #14 from jakirkham/include_miniconda3
Browse files Browse the repository at this point in the history
Include Python 2 and Python 3
  • Loading branch information
jakirkham committed Mar 1, 2016
2 parents 6f70302 + 2710d86 commit 7aa745a
Showing 1 changed file with 39 additions and 21 deletions.
60 changes: 39 additions & 21 deletions miniconda/install_miniconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,42 @@ apt-get install -y libSM6 libXext6 libXrender1
# Clean out apt-get.
apt-get clean

# Download and configure conda.
cd /usr/share/miniconda
curl http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh > miniconda.sh
bash miniconda.sh -b -p /opt/conda
rm miniconda.sh
export PATH="/opt/conda/bin:${PATH}"
source activate root
conda config --set show_channel_urls True

# Install basic conda dependencies.
conda update -y --all
conda install -y pycrypto
conda install -y conda-build
conda install -y anaconda-client
conda install -y jinja2

# Install python bindings to DRMAA.
conda install -y drmaa

# Clean out all unneeded intermediates.
conda clean -yitps
# Install everything for both environments.
export OLD_PATH="${PATH}"
for PYTHON_VERSION in 2 3;
do
export CONDA_PATH="/opt/conda${PYTHON_VERSION}"

# Download and install `conda`.
cd /usr/share/miniconda
curl "http://repo.continuum.io/miniconda/Miniconda${PYTHON_VERSION}-latest-Linux-x86_64.sh" > "miniconda${PYTHON_VERSION}.sh"
bash "miniconda${PYTHON_VERSION}.sh" -b -p "${CONDA_PATH}"
rm "miniconda${PYTHON_VERSION}.sh"

# Configure `conda` and add to the path
export PATH="${CONDA_PATH}/bin:${OLD_PATH}"
source activate root
conda config --set show_channel_urls True

# Update and install basic conda dependencies.
conda update -y --all
conda install -y pycrypto
conda install -y conda-build
conda install -y anaconda-client
conda install -y jinja2

# Install python bindings to DRMAA.
conda install -y drmaa

# Clean out all unneeded intermediates.
conda clean -yitps

# Provide links in standard path.
ln -s "${CONDA_PATH}/bin/python" "/usr/local/bin/python${PYTHON_VERSION}"
ln -s "${CONDA_PATH}/bin/pip" "/usr/local/bin/pip${PYTHON_VERSION}"
ln -s "${CONDA_PATH}/bin/conda" "/usr/local/bin/conda${PYTHON_VERSION}"
done

# Set the conda2 environment as the default.
# This should be removed in the future.
ln -s /opt/conda2 /opt/conda

0 comments on commit 7aa745a

Please sign in to comment.