Docker pydantic module issue

I’m trying to migrate my production server to the frappe docker. I have imported my data successfully from the production to the docker. The data already have existing user for our application and I can login for the existing users but I can’t signup with new user.

I’m facing the following error while login with new user and also sometimes in frappe desk as server error.
{
“exception”: “ImportError: cannot import name ‘TypeAdapter’ from ‘pydantic’ (env/lib/python3.11/site-packages/pydantic/init.cpython-311-x86_64-linux-gnu.so)”,
“exc_type”: “ImportError”,
“exc”: “["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 106, in application\n frappe.handler.handle()\n File \"apps/frappe/frappe/handler.py\", line 49, in handle\n data = execute_cmd(cmd)\n ^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/handler.py\", line 85, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/init.py\", line 1682, in call\n return fn(*args, **newargs)\n ^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/utils/typing_validations.py\", line 29, in wrapper\n args, kwargs = transform_parameter_types(func, args, kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/utils/typing_validations.py\", line 141, in transform_parameter_types\n current_arg_value_after = TypeAdapter(current_arg_type).validate_python(current_arg_value)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"apps/frappe/frappe/utils/typing_validations.py\", line 71, in TypeAdapter\n from pydantic import TypeAdapter as PyTypeAdapter\nImportError: cannot import name ‘TypeAdapter’ from ‘pydantic’ (env/lib/python3.11/site-packages/pydantic/init.cpython-311-x86_64-linux-gnu.so)\n"]”
}

I have pydantic module already exist inside env/bin environment in my docker with the same version as in production server. I can’t figure out where this error is coming from.

Added to this, In my production environment the frappe framework version mentioned as “Frappe Framework: v15.0.0-dev (main)” while my docker frappe framework version is as " Frappe Framework: v15.0.0 "

Is there any difference between these two version. How to resolve this issue?
Could this issue be related to any change for frappe signup API call??
@revant_one @buildwithhussain @vrslev @vishal
Any of you help me with the above given issue? Let me know if you need any more infomation.