Skip to content

Commit ac06131

Browse files
James D. Bohrmanljvmiranda921
James D. Bohrman
authored andcommitted
Add a Vagrantfile for easier collaboration (ljvmiranda921#193)
1 parent da8bfad commit ac06131

File tree

4 files changed

+76
-0
lines changed

4 files changed

+76
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ target/
6666

6767
# pyenv python configuration file
6868
.python-version
69+
70+
# Vagrant folder
71+
.vagrant

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@ $ cd pyswarms
7070
$ python setup.py install
7171
```
7272

73+
## Running in a Vagrant Box
74+
75+
To run PySwarms in a Vagrant Box, install Vagrant by going to
76+
https://www.vagrantup.com/downloads.html and downloading the proper packaged from the Hashicorp website.
77+
78+
Afterward, run the following command in the project directory:
79+
80+
```shell
81+
$ vagrant provision
82+
$ vagrant up
83+
$ vagrant ssh
84+
```
85+
Now you're ready to develop your contributions in a premade virtual enviroment.
86+
7387
## Basic Usage
7488

7589
PySwarms provides a high-level implementation of various particle swarm

Vagrantfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure("2") do |config|
5+
6+
config.vm.box = "ubuntu/xenial64"
7+
8+
config.vm.box_check_update = false
9+
10+
config.vm.provision :shell, :privileged => false, :path => "provisioner.sh"
11+
end

provisioner.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
export DEBIAN_FRONTEND=noninteractive
4+
5+
# Update sources
6+
sudo apt-get update -y
7+
8+
# Git
9+
sudo apt-get install git
10+
11+
# Python
12+
sudo apt-get install -y python-pip python-dev build-essential
13+
14+
# PyYaml
15+
sudo apt-get update
16+
sudo apt-get install python-yaml
17+
18+
# Future
19+
20+
sudo apt-get update
21+
pip install future
22+
23+
# Scipy & Numpy
24+
sudo apt-get update
25+
sudo apt-get install python-numpy python-scipy
26+
27+
# matplotlib
28+
sudo apt-get update
29+
sudo apt-get install python-matplotlib
30+
31+
# Mock
32+
sudo apt-get update
33+
pip install mock
34+
35+
# pytest
36+
sudo apt-get update
37+
pip install -U pytest
38+
39+
# attrs
40+
sudo apt-get update
41+
pip install attrs
42+
43+
# AWS Cli
44+
sudo apt-get update
45+
pip install awscli
46+
47+
# Vim
48+
sudo apt-get install vim -y

0 commit comments

Comments
 (0)