Skip to content

Instantly share code, notes, and snippets.

@bmmalone
Last active March 22, 2018 14:28
Show Gist options
  • Save bmmalone/7e05e32bd6e856479dd7445946ca3ccc to your computer and use it in GitHub Desktop.
Save bmmalone/7e05e32bd6e856479dd7445946ca3ccc to your computer and use it in GitHub Desktop.
Embedding propagation installation instructions
#! /usr/bin/env bash
export PATH=$HOME/local/bin:$PATH
export PYTHON_2_VERSION=2.7.13
export PYTHON_3_VERSION=3.6.1
# executables will be installed in $HOME/local/bin
mkdir -p $HOME/local/bin
cd $HOME/local/bin
# grab the requirements to ensure a complete python build
# this requires sudo
wget https://gist.github.com/bmmalone/f3bb86d248ebc8970f9b6868bd85516b/raw/install-python-prereqs
chmod +x install-python-prereqs
./install-python-prereqs
# Download, extract and install Python 2. This is necessary for creating the virtual environment
cd $HOME/install
wget https://www.python.org/ftp/python/$PYTHON_2_VERSION/Python-$PYTHON_2_VERSION.tgz
tar -xvf Python-$PYTHON_2_VERSION.tgz
cd Python-$PYTHON_2_VERSION
./configure --prefix=$HOME/local --with-ensurepip=install
make
make install
# Download, extract and install Python 3. This is necessary for the pipelines
cd $HOME/install
wget https://www.python.org/ftp/python/$PYTHON_3_VERSION/Python-$PYTHON_3_VERSION.tgz
tar -xvf Python-$PYTHON_3_VERSION.tgz
cd Python-$PYTHON_3_VERSION
./configure --prefix=$HOME/local --with-ensurepip=install
make
make install
# Upgrade both versions of pip.
pip2 install --upgrade pip && pip3 install --upgrade pip wheel
# Install the virtual environment wrapper for Python 2.
pip2 install --upgrade virtualenvwrapper
# now, pull the python projects
mkdir -p $HOME/python-projects
cd $HOME/python-projects
# make the virtual environment
mkvirtualenv ep -p $HOME/local/bin/python3
git clone [email protected]:mniepert/ep.git
cd ep
pip3 install -r requirements.txt
# this is only necessary if there is an attached GPU
pip3 install .[gpu]
# this is necessary for tests
pip3 install.[test]
nosetests tests/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment