Let $A \subset \mathbb{R}^{n}$ be a closed set. Does there exist an open set $O$ containing $A$, and a smooth function $f : O \to \mathbb{R} $ such that
$f(x) = 0$ for all $x \in A$,
$f(x) > 0$ and $\nabla f(x) \ne 0$ for all $x \in O \setminus A$,
and $f(x) \to \infty$ as $x \to \partial O$ ?