Skip to content

Commit

Permalink
Add a Vagrantfile for easier collaboration (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
James D. Bohrman authored and ljvmiranda921 committed Aug 10, 2018
1 parent b96a08d commit b8602e3
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ target/

# pyenv python configuration file
.python-version

# Vagrant folder
.vagrant
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ $ cd pyswarms
$ python setup.py install
```

## Running in a Vagrant Box

To run PySwarms in a Vagrant Box, install Vagrant by going to
https://www.vagrantup.com/downloads.html and downloading the proper packaged from the Hashicorp website.

Afterward, run the following command in the project directory:

```shell
$ vagrant provision
$ vagrant up
$ vagrant ssh
```
Now you're ready to develop your contributions in a premade virtual enviroment.

## Basic Usage

PySwarms provides a high-level implementation of various particle swarm
Expand Down
11 changes: 11 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

config.vm.box = "ubuntu/xenial64"

config.vm.box_check_update = false

config.vm.provision :shell, :privileged => false, :path => "provisioner.sh"
end
48 changes: 48 additions & 0 deletions provisioner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive

# Update sources
sudo apt-get update -y

# Git
sudo apt-get install git

# Python
sudo apt-get install -y python-pip python-dev build-essential

# PyYaml
sudo apt-get update
sudo apt-get install python-yaml

# Future

sudo apt-get update
pip install future

# Scipy & Numpy
sudo apt-get update
sudo apt-get install python-numpy python-scipy

# matplotlib
sudo apt-get update
sudo apt-get install python-matplotlib

# Mock
sudo apt-get update
pip install mock

# pytest
sudo apt-get update
pip install -U pytest

# attrs
sudo apt-get update
pip install attrs

# AWS Cli
sudo apt-get update
pip install awscli

# Vim
sudo apt-get install vim -y

0 comments on commit b8602e3

Please sign in to comment.