Spaces automatically installs pydantic 2.5.2, though it is incompatible with my app

I need to use version 1.9.x or below and the build for the container automatically overwrites it. is there any way to change this?

hi @woodr7 are you using the Gradio SDK? have you tried setting it on pre-requirements.txt or requirements.txt ?

I’m using the Streamlit SDK. is gradio more flexible? @radames

I have tried setting it on requirements.txt but after installing the correct version (1.10.13) it overwrites it with 2.5.2

For our specific SDKs Gradio/Streamlit we have specific Dockerfiles. Maybe @whitphx can help you with the issue with Streamilt and pydantic version?

@whitphx That would be extremely helpful!

@woodr7 o another solution is to use the Docker SDK and you’re free to write the build steps, we have a template here

1 Like

Hi @woodr7 , thank you for reporting it.
I will delegate it to the Spaces team to solve.
Please try using the Docker SDK as @radames suggested for now, sorry.

1 Like