4. User’s setup on Ubuntu (entry/medium level users)

Users on Ubuntu have an ability to install Veles much easier than with other methods.

4.1. Via ubintu-install script

Veles can be installed just with one command. Run:

wget -O - https://velesnet.ml/ubuntu-install.sh | bash -

It will be located at /usr/lib/python3/dist-packages/veles.

After instalation of veles, copy samples from /usr/lib/python3/dist-packages/veles/znicz/samples and /usr/lib/python3/dist-packages/veles/samples to your local directory (/home/user/veles_samples for example). And run veles:

python3 -m veles -s /home/user/veles_samples/MNIST/mnist.py -

If you have some issues, follow next steps


4.2. Repositories

4.2.1. Veles Debian repository

Add Smaug repository to your /etc/apt/sources.list:

sudo nano /etc/apt/sources.list

Add below line to the end of file:

deb https://velesnet.ml/apt trusty main

On newer Ubuntu, replace trusty with your distribution code name.

If Smaug is not accessible from your point, there are two options left: either fall back to User’s setup (Cluster deployers and entry/medium level users of GNU/Linux) or obtain a mirror server. The latter requires you to have the archive with Smaug’s repository beforehand and reprepro utility, see Setting up a local mirror.

Add the repository public key:

wget -O - https://velesnet.ml/apt/velesnet.ml.gpg.key | sudo apt-key add -

4.2.2. Proxy setup

This step is necessary only if you use a proxy server to connect to the internet.

If your apt uses a proxy server to connect to the internet (this is what we have in Samsung headquaters), you must add the exclusion for velesnet.ml to apt and make pip use your proxy. Add the following to /etc/apt/apt.conf:

Acquire::http::Proxy {
    velesnet.ml DIRECT;

And add the following to ~/.pip/pip.conf:

proxy =
no-check-certificate = True

Create those configuration files as needed. Replace with your proxy address. If your proxy is not an HTTP proxy (e.g., Tor), pip setup will require some additional steps. proxy should be set to http://localhost:8123 then.

If your pip’s version is lower than 1.6 (true for Ubuntu <=14.10), you must upgrade pip:

GIT_SSL_NO_VERIFY=1 pip3 install git+https://github.com/djs/pip Setting up HTTP to SOCKS proxy forwarding

We are going to use polipo:

sudo apt-get install polipo

Change the configuration file /etc/polipo/config:

proxyAddress =
allowedClients =
socksParentProxy =

Restart the proxy server:

sudo service polipo restart

4.2.3. Setting up a local mirror

This step is needed only if velesnet.ml is inaccessible from your site. The easiest way to build a mirror is to install and use aptly. Besides, you must obtain the *.deb files belonging to the repository from some other source, e.g. via email or file sharing though 3-rd party. Execute and carefully read the output:

aptly repo create veles
aptly repo add veles /path/to/deb/files
aptly publish repo -distribution=trusty veles
aptly serve

Replace “trusty” with the proper distribution codename (see lsb_release -c).

4.3. Veles package installation

sudo apt-get install python3-veles

If the installation failes on the last stage of fetching python dependecies via pip with messages like:

Download error on https://pypi.python.org/simple/pbr/: [Errno 110] Connection timed out -- Some packages may not be found!

most likely you hit this issue connected to the bug in “requests” Python package. There are two options available then: install timed out packages by hand:

sudo pip3 install <package name>

and then continue the installation:

sudo apt-get install python3-veles

or use the workaround described in this post.