-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile-bionic-prebuiltwheels
85 lines (72 loc) · 3.42 KB
/
Vagrantfile-bionic-prebuiltwheels
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# https://docs.vagrantup.com.
# Plain vanilla ubuntu 18.04
config.vm.box = "ubuntu/bionic64"
# This requires the vagrant-disksize add-on, we want a few more GBs
# for the compilation cruft than the standard 10.
# Seems this is not needed for modern vagrant, as the standard is now 40GB
# config.disksize.size = '16GB'
# This port forward allows running the GS GUI from the host web browser
config.vm.network "forwarded_port", guest:5000, host:5000
config.vm.network "forwarded_port", guest:50000, host:50000, protocol: "tcp"
config.vm.network "forwarded_port", guest:50000, host:50000, protocol: "udp"
# Make some folders syncronized between the host and guest
config.vm.synced_folder "..", "/home/vagrant/src"
config.vm.synced_folder "./wheels-bionic", "/wheels"
config.vm.synced_folder "./deb-archive-bionic", "/var/cache/apt/archives/"
config.vm.synced_folder "../tools", "/opt/tools"
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
vb.cpus = "4"
end
# This script installs SublimeText and SublimeMerge tools. If you do not
# want those tools, comment the line below COMMENT SUBLIME HERE.
$sublime_provision_script = <<-SCRIPT
echo "Get SublimeText and SublimeMerge git tools, comment out the next 3 lines if you do not want it"
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
apt-get -y install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | tee /etc/apt/sources.list.d/sublime-text.list
apt-get update
apt-get -y install sublime-text sublime-merge
SCRIPT
# COMMENT OUT SUBLIME HERE:
config.vm.provision "shell", inline: $sublime_provision_script
$root_provision_script = <<-SCRIPT
apt-get update
apt-get -y upgrade
apt-get -y install time pkg-config g++ tcsh libc6-i386 python-pil.imagetk gtk+-3.0 libgstreamer-plugins-base1.0-dev
apt-get -y install python-pip python-dev python-lxml python-tk python-cheetah python-enum34 python-markdown python-pexpect python-pmw python-numpy python-scipy python-matplotlib python-pycurl
apt-get -y install python-pathlib2
apt-get -y install python3-venv python3-pip
apt-get -y install python3-six python3-lxml python3-markdown python3-pytest python3-pexpect
apt-get -y install python3-flask python3-flask-restful python3-openpyxl
apt-get -y install firefox
/usr/bin/pip2 install --upgrade pip
pip2 install /wheels/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl
apt-get -y install python-wxgtk3.0
apt-get -y install xterm cmake
apt-get -y install cmake-curses-gui
SCRIPT
# Applies the necessary system configurations
config.vm.provision "shell", inline: $root_provision_script
$user_provision_script = <<-SCRIPT
pip3 install --user Cheetah3
pip3 install --user setuptools_scm
PATH="$HOME/.local/bin:$PATH"
python3 -m venv ./fprime-venv
. ./fprime-venv/bin/activate
pip install fprime-tools fprime-gds
echo "source $HOME/fprime-venv/bin/activate" >> $HOME/.profile
cd ~
git clone https://github.com/SterlingPeet/python-fprime-extras.git
cd python-fprime-extras
git checkout devel
pip install -e .
SCRIPT
# Applies user level convienence configurations
config.vm.provision "shell", inline: $user_provision_script, privileged: false
# Provide X forwarding by default
config.ssh.forward_x11 = true
end