Note: thanks to @RodrigodeAzevedo and @ Dominic for sharing valuable information.
The answer is based on this
Let's say you are given a set of inequalities that describes by a polytope:
\begin{equation}
P = \{ x \in \mathbb{R}^n \mid a_i^Tx \leq b_i, \; i=1,...,m\}
\end{equation} So intention is to find inscribed ellipsoid with maximum volume. Let $\varepsilon$ be the ellipsoid that is to be estimated:
\begin{equation}
E = \{x \mid x = By + d, y \in \mathbb{R}^n, \left \| y \right \|_2 \leq 1, \; B= B^T \succ 0\}.
\end{equation} In order to maximize the volume, the condition $E \subseteq P$ should be satisfied; this condition can be formed as the following way as a set of inequalities:
\begin{equation}
\left \| Ba_i \right \| + a_i^Td \leq b_i, \; i=0,...,m
\end{equation}
Now we are ready to find the inscribed ellipsoid.
\begin{equation}\label{max_volume}
\begin{aligned}
\min_{B,d} \quad & -\log \det(B)\\
\textrm{s.t.} \quad &\left \| Ba_i \right \| + a_i^Td \leq b_i, \; i=0,...,m \\
& B \succeq 0\\
\end{aligned}
\end{equation}
In python, this can be written as follows:
B = cp.Variable((dim,dim), PSD=True)
d = cp.Variable(dim)
constraints = [cp.norm(B@A[i],2)+A[i]@d<=b[i] for i in range(len(A))]
prob = cp.Problem(cp.Minimize(-cp.log_det(B)), constraints)
optval = prob.solve()
For example,