Last active
November 6, 2017 05:26
-
-
Save wtnb75/9da5e25aa413fc5f50af1bfe5645b6dd to your computer and use it in GitHub Desktop.
Movidius NCS Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c = get_config() | |
c.NotebookApp.ip = "*" | |
# pass = password | |
c.NotebookApp.password = u'sha1:46407e38d811:f2815bb0e56b1882a6be487c3f7f582c9c11f911' | |
c.NotebookApp.open_browser = False | |
c.NotebookApp.port = 8888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Defaults env_reset | |
Defaults env_keep="http_proxy" | |
Defaults env_keep+="https_proxy" | |
Defaults env_keep+="no_proxy" | |
Defaults !mail_badpass | |
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" | |
root ALL=(ALL:ALL) ALL | |
%admin ALL=(ALL) NOPASSWD: ALL | |
%sudo ALL=(ALL:ALL) NOPASSWD: ALL | |
#includedir /etc/sudoers.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
03e7 Movidius | |
2150 Neural Compute Stick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.box_check_update = false | |
config.vm.network :forwarded_port, guest: 8888, host: 8888 | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "4096" | |
vb.cpus = 2 | |
vb.customize ["modifyvm", :id, "--paravirtprovider", "kvm"] | |
vb.customize ["modifyvm", :id, "--hwvirtex", "on"] | |
vb.customize ["modifyvm", :id, "--ioapic", "on"] | |
vb.customize ["modifyvm", :id, "--usb", "on"] | |
vb.customize ["modifyvm", :id, "--usbxhci", "on"] | |
vb.customize ["usbfilter", "add", "1", "--target", :id, "--name", "Movidius1", "--vendorid", "0x03e7", "--productid", "0x2150"] | |
vb.customize ["usbfilter", "add", "2", "--target", :id, "--name", "Movidius2", "--vendorid", "0x040e", "--productid", "0xf63b"] | |
end | |
config.vm.provision "shell", inline: <<-SHELL | |
cat <<EOF > /etc/profile.d/proxy.sh | |
# export http_proxy=http://your-proxy:8080 | |
# export https_proxy=http://your-proxy:8080 | |
# export no_proxy=your-no-proxy | |
EOF | |
SHELL | |
config.vm.provision "shell", inline: <<-SHELL | |
update-alternatives --set editor /usr/bin/vim.tiny | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y make git gcc perl wget sudo curl lsb-release vim udev usbutils | |
cp /vagrant/sudoers /etc/sudoers | |
cat /vagrant/usb.ids.add >> /var/lib/usbutils/usb.ids | |
[ -d /vagrant/ncsdk ] || git clone https://github.com/movidius/ncsdk.git /vagrant/ncsdk | |
cd /vagrant/ncsdk && sudo -u ubuntu make install | |
pip3 install pandas keras sklearn | |
pip3 install "ipython[notebook]" | |
mkdir -p ~ubuntu/.jupyter | |
cp /vagrant/jupyter_notebook_config.py ~ubuntu/.jupyter/ | |
chown -R ubuntu. ~ubuntu/.jupyter | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment