MV Optimization can easily be expressed as a regression (OLS) problem.
Firstly unconstrained: If you regress a $N\times1$ (NX1 where Nwhere $N$ is the sample size) vector of ones on the asset returns, the relative regression coefficients are the same as the MVO weights,weights; in fact, they are the solution to the maximization of qudraticquadratic utility i.e. E[r]-risk_aversion*E[r^2]$E[r]-\text{risk_aversion}\times E[r^2]$.
So by changing the constant dependent variable, we can arrive at weights that are exactly the same as MVO ones. If you solve MVO weights for a given risk aversion, themthen compute the portfolio mean and the portfolio variance, then the dependent variable in the regression will be [(mean^2+var)/mean]*ONE,$$\left[(\text{mean}^2+\text{var})/\text{mean}\right]\times\text{ONE}$$ where again ONE$\text{ONE}$ is an NX1$N\times1$ vector.
Introducing constraints is convenient with any quadratic programming engine you have access to.