Skip to content

Instantly share code, notes, and snippets.

@magsol
Last active May 23, 2017 18:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magsol/165330b48c869a7ccc33 to your computer and use it in GitHub Desktop.
Save magsol/165330b48c869a7ccc33 to your computer and use it in GitHub Desktop.
Python packages I use.
#!/bin/bash
# Anaconda environment setup script. By default, it installs a linux Miniconda
# for Python 3 and creates a parallel Python 2 environment.
#############################
### CONFIGURATION OPTIONS ###
#############################
os="linux" # You can change this to "osx" if you're on a Mac.
py2=true # You can change this to false if you don't want a Py2 environment.
prefix=/opt/python
##############################
### THAT'T IT, YOU'RE DONE ###
##############################
# Now let the installer do its thing.
# First step: download Miniconda.
f="Linux"
if [[ "$os" == "osx" ]]; then
f="MacOSX"
fi
bin="Miniconda3-latest-${f}-x86_64.sh"
url="https://repo.continuum.io/miniconda/${bin}"
curl -O $url
chmod +x $bin && ./${bin} -f -b -p $prefix && rm ./${bin}
export PATH=${prefix}/bin:$PATH
# Update everything.
conda update -y --all
conda install -y nbformat
conda config --add channels conda-forge
# Install some valuable packages.
conda install -c menpo -y opencv3
conda install -c menpo -y menpoproject
conda install -c soumith -y pytorch torchvision
# Add the condarc file.
cp environment.yml ${prefix}/
conda env update -n root -f ${prefix}/environment.yml
if [[ "$py2" == true ]]; then
conda create -y -n python2 python=2
conda env update -n python2 -f ${prefix}/environment.yml
source activate python2
#################################
### INSTALL PYTHON 2 PACKAGES ###
#################################
if [[ "$os" == "linux" ]]; then
conda install -y starcluster theano
fi
conda install -y astropy beautiful-soup future protobuf pyamg
pip install thunder-python
##############################
### THAT'T IT, YOU'RE DONE ###
##############################
source deactivate
else
#################################
### INSTALL PYTHON 3 PACKAGES ###
#################################
if [[ "$os" == "linux" ]]; then
conda install -y theano
pip install starcluster
fi
##############################
### THAT'T IT, YOU'RE DONE ###
##############################
fi
#!/bin/bash
# Barebones core installation of a Python environment for use in
# BlueData nodes.
prefix=/opt/python
bin="Miniconda3-latest-Linux-x86_64.sh"
url="https://repo.continuum.io/miniconda/${bin}"
curl -O $url
chmod +x $bin && ./${bin} -f -b -p $prefix && rm ./${bin}
export PATH=${prefix}/bin:$PATH
# Update everything.
conda update -y --all
conda install -y nbformat
# Install all the base packages.
conda install -y decorator gensim h5py hdf5 ipython joblib jupyter matplotlib \
nltk numpy pandas pillow psutil scipy scikit-learn scikit-image toolz
pip install spark-sklearn
#!/bin/bash
# Barebones core installation of a Python environment for use in a dask cluster.
prefix=/opt/python
bin="Miniconda3-latest-Linux-x86_64.sh"
url="https://repo.continuum.io/miniconda/${bin}"
wget $url
chmod +x $bin && ./${bin} -f -b -p $prefix && rm ./${bin}
export PATH=${prefix}/bin:$PATH
# Update everything.
conda update -y --all
conda install -y nbformat
# Install all the base packages.
conda install -y bokeh dask decorator gensim h5py hdf5 ipython joblib jupyter \
matplotlib nltk numpy pandas pillow psutil scipy scikit-learn scikit-image \
toolz terminado
conda install -y distributed -c conda-forge
dependencies:
- astropy
- blaze-core
- bokeh
- bottleneck
- click
- cython
- dask
- decorator
- fastparquet
- freetype
- gensim
- h5py
- hdf5
- ipython
- joblib
- jupyter
- libpng
- libsodium
- libtiff
- libxml2
- llvmlite
- lz4
- matplotlib
- nltk
- numba
- numpy
- pandas
- pep8
- pillow
- scikit-image
- scikit-learn
- scipy
- seaborn
- shapely
- sqlalchemy
- sqlite
- toolz
- tornado
- twisted
- xarray
- pip:
- awscli
- bolt-python
- certifi
- deap
- distributed
- fbpca
- keras
- lasagne
- requests
- picos
- plotly
- pycallgraph
- scikit-neuralnetwork
- sframe
- sima
- spark-sklearn
- tpot
- tqdm
- tweepy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment