Skip to content

Commit

Permalink
Revert "Remove unmaintained installation script."
Browse files Browse the repository at this point in the history
This reverts commit 93b8a81.
  • Loading branch information
BentleyJOakes committed Sep 23, 2019
1 parent 93b8a81 commit 54b2e4a
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ To run AToMPM on Windows, execute the `run.bat` script inside of the main AToMPM
3. Open a browser (Firefox or Chrome) and navigate to http://localhost:8124/atompm

* The above steps are automated by the `run_AToMPM_local.sh` script
* Note that the `run_AToMPM.sh` script can automate the installation and usage of AToMPM
* The first time you run this script, all dependencies are automatically downloaded and installed in the `dependencies/` folder.
* If, for any reason, the download process is interrupted or you experience problems with AToMPM, remove the `dependencies/` folder and run the script again.

## Documentation
Documentation for AToMPM can be found here: https://msdl.uantwerpen.be/documentation/AToMPM/index.html
Expand Down
89 changes: 89 additions & 0 deletions run_AToMPM.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/bin/bash
# Author: Yentl Van Tendeloo

set -e
working_dir=`pwd`

if [ ! -d "dependencies" ]; then
mkdir dependencies

# Install socket.IO first
curl -L -O https://msdl.uantwerpen.be/AToMPM/socketIO.tgz
tar -xvzf socketIO.tgz

cd dependencies
# First fetch Node.JS
curl -L -O http://msdl.uantwerpen.be/AToMPM/node-v4.5.0.tar.gz
tar -xvzf node*
rm node-*.tar.gz
cd node*
./configure --prefix=$working_dir/dependencies/node.js
make -j5
make install
cd ..

# Install Python with development headers
# Install zlib seperately
curl -L -O http://msdl.uantwerpen.be/AToMPM/zlib-1.2.8.tar.gz
tar -xvzf zlib-*
rm zlib-*.tar.gz
cd zlib-*
./configure --prefix=$working_dir/dependencies/localPython
make
make install
cd ..
curl -L -O http://msdl.uantwerpen.be/AToMPM/Python-2.7.12.tar.xz
tar -xvf Python-*
rm Python-*.tar.xz
cd Python-2.7.12
./configure --prefix=$working_dir/dependencies/localPython
sed -i "s/^#zlib/zlib/g" Modules/Setup
make -j5
make install
export PATH=$working_dir/dependencies/localPython/bin:$PATH
cd ..

# Remove previous builds
rm -rf python-igraph || true
mkdir python-igraph
cd python-igraph

# Install igraph C core
curl -L -O http://msdl.uantwerpen.be/AToMPM/igraph-0.7.1.tar.gz
tar -xvzf igraph-*
rm igraph-*.tar.gz
cd igraph-*
./configure
make -j5

# Install python-igraph binding
curl -L -O http://msdl.uantwerpen.be/AToMPM/python-igraph-0.7.1.post6.tar.gz
tar -xvzf python-igraph-*
rm python-igraph-*.tar.gz
cd python-igraph-*
rm setup.cfg
echo "[build_ext]" > setup.cfg
echo "include_dirs = ../../../localPython/include/python2.7:../../build/include:../include:../../include:/usr/local/include:/usr/include" >> setup.cfg
echo "library_dirs = ../../../localPython/lib:../../build/src/.libs:../lib/:../src/.libs:../../src/.libs:/usr/local/lib:/usr/lib" >> setup.cfg
echo "" >> setup.cfg
echo "[egg_info]" >> setup.cfg
echo "tag_build = " >> setup.cfg
echo "tag_date = 0" >> setup.cfg
echo "tag_svn_revision = 0" >> setup.cfg
python setup.py install --user
cd ..

echo "INSTALLATION SUCCESSFUL"
echo "Continuing to start up AToMPM!"
cd ..
cd ..
cd ..
fi

# Set PATHs correctly
export PATH=$working_dir/dependencies/localPython/bin:$working_dir/dependencies/node.js/bin:$PATH
export LD_LIBRARY_PATH="$working_dir/dependencies/python-igraph/igraph-0.7.1/src/.libs/:$working_dir/dependencies/localPython/lib"

node httpwsd.js &
sleep 3
python mt/main.py

0 comments on commit 54b2e4a

Please sign in to comment.