Skip to content

Instantly share code, notes, and snippets.

@wtnb75
Last active November 6, 2017 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wtnb75/9da5e25aa413fc5f50af1bfe5645b6dd to your computer and use it in GitHub Desktop.
Save wtnb75/9da5e25aa413fc5f50af1bfe5645b6dd to your computer and use it in GitHub Desktop.
Movidius NCS Vagrantfile
c = get_config()
c.NotebookApp.ip = "*"
# pass = password
c.NotebookApp.password = u'sha1:46407e38d811:f2815bb0e56b1882a6be487c3f7f582c9c11f911'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
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
03e7 Movidius
2150 Neural Compute Stick
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