Skip to content

Instantly share code, notes, and snippets.

@danielballan
Last active February 6, 2017 00:04
Show Gist options
  • Save danielballan/c02c17f92650e21488a3 to your computer and use it in GitHub Desktop.
Save danielballan/c02c17f92650e21488a3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage:
# sudo su
# export https_proxy=proxy:8888
# wget https://gist.githubusercontent.com/danielballan/c02c17f92650e21488a3/raw -O setup_conda.sh
# chmod +x setup_conda.sh
# rm -rf ~/.conda
# rm ~/.condarc
# ./setup_conda.sh
# source ~/.bashrc
# conda install --yes -n analysis xxx_configuration
# conda install --yes -n collection xxx_configuration
# where xxx is csx, chx, xpd, etc.
# For context, read http://conda.pydata.org/docs/install/central.html
export http_proxy=http://proxy:8888
export https_proxy=http://proxy:8888
rm -rf ~/.conda # remove root user's conda config, if any
rm ~/.condarc # remove root user's condarc, if any
rm -rf ~/.config/binstar # remove root user's binstar (anaconda) config, if any
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b -p /opt/conda
echo "PATH=/opt/conda/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
conda install anaconda-client conda-build --yes
conda config --system --add channels anaconda
conda config --system --add channels nsls2
conda config --system --add create_default_packages pip
conda config --system --add create_default_packages anaconda-client
conda config --system --add envs_dirs /opt/conda_envs
conda config --system --add envs_dirs \~/conda_envs
anaconda config --set url https://conda.nsls2.bnl.gov/api
conda config --system --remove channels defaults --force
conda update --all --yes
mkdir -p /opt/conda_envs
# Dont' do this anymore.
# conda create --yes -p /opt/conda_envs/analysis analysis
# conda create --yes -p /opt/conda_envs/collection collection
@mkarasawa
Copy link

this is puppetized, check on the test1 to see if everything is deployed correctly, then we'll push to production

@tacaswell
Copy link

I think this also needs

find /opt/conda -type d -execdir chmod og+x {} +
chmod -R a+r /opt/conda

to get the permissions right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment