  Using ab initio density functional theory with static mean-field
correlations, we calculate the Heisenberg and Dzyaloshinskii-Moriya
interactions (DMI) for an atomistic spin Hamiltonian for the lacunar spinel,
GaV$_4$S$_8$. The parameters describing these interactions are used in
atomistic spin dynamics and micromagnetic simulations. The magnetic properties
of the lacunar spinel GaV$_4$S$_8$, a material well-known from experiment to
host magnetic skyrmions of N\'eel character, are simulated with these ab initio
calculated parameters. The Dzyaloshinskii-Moriya contribution to the
micromagnetic energy is a sum of two Lifshitz invariants, supporting the
formation of N\'eel skyrmions and its symmetry agrees with what is usually
expected for $C_{3\nu}$-symmetric systems. The are several conclusions one may
draw from this work. One concerns the quantum nature of the magnetism, where we
show that the precise magnetic state of the V$_4$ cluster is crucial for
understanding quantitatively the magnetic phase diagram. In particular we
demonstrate that a distributed-moment state of each V$_4$ cluster explains well
a variety of properties of GaV$_4$S$_8$, such as the band gap, observed Curie
temperature and especially the stability of N\'eel skyrmions in the
experimentally relevant temperature and magnetic-field range. In addition, we
find that electronic correlations change visibly the calculated value of the
DMI.
