According to FINA rules the minimum depth is 2m and 3m is recommended when it is also used for other disciplines like artistic swimming.
https://resources.fina.org/fina/document/2022/02/08/77c3058d-b549-4543-8524-ad51a857864e/210805-Facilities-Rules_clean.pdf