Skip to content

Instantly share code, notes, and snippets.

@rhiannonlynne
Last active February 2, 2017 20:11
Show Gist options
  • Save rhiannonlynne/b2542c8820f276164c08 to your computer and use it in GitHub Desktop.
Save rhiannonlynne/b2542c8820f276164c08 to your computer and use it in GitHub Desktop.
Setting up a new mac to use with LSST (primarily lsst sims packages, but easily modified for other packages). (because I've had to do this over and over recently).
Setting up new mac for LSST (later parts assume you use csh for your shell)
Useful apps:
+ Install chrome https://www.google.com/chrome/browser/desktop/
+ Install aquamacs http://aquamacs.org/download.shtml
+ Install mactex https://www.tug.org/mactex/
+ Install flux https://justgetflux.com/
+ Install sourcetree https://www.sourcetreeapp.com/
+ Install slack https://slack.com/downloads/osx
+ Install bluejeans app http://bluejeans.com/downloads
+ Install anaconda http://continuum.io
Homebrew install (use this to get ffmpeg and mariadb/mysql/gfortran)
http://brew.sh/
Install homebrew:
bash ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install useful homebrew packages:
brew install ffmpeg
brew install mariadb
brew install freetds
brew install wget
brew install gcc (automatically includes gfortran)
brew install cmake
Set up mariadb (or mysql, if you prefer mysql)
https://mariadb.com/kb/en/mariadb/building-mariadb-on-mac-os-x-using-homebrew/
unset TMPDIR
mysql_install_db
mysqld_safe
mysql_secure_installation
done until want to add more users/databases.
Get python - Anaconda install and pyephem/palpy/other req for LSST stack
Download from http://continuum.io/downloads
and get academic license for IoPro and Anaconda Accelerate if desired https://store.continuum.io/cshop/academicanaconda
conda install ephem
conda install basemap
pip install palpy
pip install pymssql
pip install mysql-python
pip install healpy
conda update —all
Get ready to install the LSST stack.
(via eups:)
mkdir ~/lsst
cd ~/lsst
curl -O https://sw.lsstcorp.org/eupspkg/newinstall.sh
bash newinstall.sh
(say no to git and anaconda installation when offered)
cd ~/lsst/site
edit manifest.remap file to avoid installing / downloading packages we installed externally:
cat > manifest.remap
>>
healpy system
pyephem system
freetds system
pymssql system
palpy system
mysql system
mysqlpython system
#mysqlclient system
>>
Now get ready to install packages from LSST :
source ~/lsst/loadLSST.csh
eups declare healpy system -m none -r none
eups declare pyephem system -m none -r none
eups declare freetds system -m none -r none
eups declare pymssql system -m none -r none
eups declare palpy system -m none -r none
eups declare mysql system -m none -r none
eups declare mysqlpython system -m none -r none
eups declare mysqlclient system -m none -r none
and (because scons won’t let anaconda’s version of MySQLdb find these libraries unless we link them somewhere ‘normal’)
ln -s ~/anaconda/lib/libssl.1.0.0.dylib /usr/local/lib
ln -s ~/anaconda/lib/libcrypto.1.0.0.dylib /usr/local/lib
Now install the rest of the stack:
eups distrib install lsst_sims -t sims
eups distrib install sims_operations -t sims
Add git repo versions of sims_maf, sims_maf_contrib, other sims packages if needed for development (note if you need one sims package, you might need the others, depending on what you’re doing)
mkdir ~/lsstRepos
cd ~/lsstRepos
foreach i (sims_maf sims_catUtils sims_catalogs sims_coordUtils sims_photUtils sims_utils sims_skybrightness sims_skybrightness_data)
git clone [email protected]:lsst/$i.git
cd $i
eups declare $i -r . -t $USER
setup $i -t $USER
scons
cd ..
git clone [email protected]:lsst-nonproject/sims_maf_contrib.git
cd sims_maf_contrib
eups declare sims_maf_contrib -r . -t $USER
setup sims_maf_contrib
And add sims_operations (using your own mysql db)
git clone [email protected]:lsst/sims_operations
cd sims_operations
eups declare sims_operations -r . -t $USER
setup sims_operations -t $USER
scons
edit tools/setup_db.sh to set the desired password for www (opSim user)
bash tools/setup_db.sh (assuming mariaDB is running)
edit ~/.my.cnf :
cat > ~/.my.cnf
>>
[client]
user = www
pass = yourpasswd
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment