Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Installation Guide

kamil-kaczmarek edited this page Mar 23, 2018 · 21 revisions

Prerequisites

  1. Python 3.5
  2. Linux OS (Minerva is tested on Linux machines only)
  3. libturbojpeg that speeds-up preprocessing. Installation (on Ubuntu 16.04): sudo apt install libturbojpeg

Get the code

Clone or download Minerva code. Type:

$ cd your/working/directory
$ git clone https://github.com/neptune-ml/minerva.git

Note that you must have writing permission in your working directory.

Setup virtualenv

  1. Create virtualenv:
$ cd your/working/directory
$ virtualenv minerva_venv -p python3.5

Note that you must have writing permission in your working directory.

  1. Activate newly created environment:
$ source minerva_venv/bin/activate
  1. Check if your python is in the Minerva environment. Type:
$ which python

You should get answer similar to this:

./minerva_venv/bin/python

Install CUDA-dependent packages

Minerva uses both PyTorch and Keras with TensorFlow backend. These packages comes in two flavors: with GPU acceleration and without it. Note that it is highly recommended to train your solution on GPU.

Check your CUDA version

If you already know your CUDA version go straight to CUDA section

There are several ways to get this information:

  1. Type:
$ nvcc --version

You should get answer similar to this:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep__4_22:14:01_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44

CUDA version is printed at the end of the last line.

  1. If previous step didn't work, type:
$ cat /usr/local/cuda/version.txt

You should get answer similar to this:

CUDA Version 8.0.61
  1. If previous steps didn't work, CUDA is probably not installed on your computer. If you want to take advantage of it anyway, ask your system administrator for support.

CUDA

  1. install TensorFlow
$ pip3 install tensorflow-gpu==1.2.0
  1. Install Keras
$ pip3 install keras
  1. install PyTorch, by following PyTorch Get Started. Make sure that you picked python 3.5 and appropriate CUDA version.

no CUDA

It this case, you will work on your processor.

  1. install TensorFlow
$ pip3 install tensorflow==1.2.0
  1. Install Keras
$ pip3 install keras
  1. install PyTorch, by following PyTorch Get Started. Make sure that you picked python 3.5 and None CUDA version.

Install Minerva requirements

While your environment is activated (check Setup virtualenv section), install remaining requirements. Type:

$ cd path/to/minerva
$ pip3 install -r requirements.txt

Register in Neptune (optional)

You may want to consider using Neptune to train your models. It gives you an access to powerful external resources and allows you to easily track the progress of your experiments. Minerva is fully integrated with Neptune, however registering in Neptune is not required at any point.

To work with Neptune:

  1. Go to https://neptune.ml/ and create your account.
  2. Go to Neptune Dashboard and create a project called minerva with key MIN.
  3. Any time you want to make sure you are logged in to Neptune, type:
$ neptune login

That's all! Now you may want to go to the User Guide to check how to work with Minerva.