Websockets >= 14 support for gardio spaces

Hey there, I am using gardio spaces to host a leaderboard and during calculating leaderboard I use libs that requires a new version of websockets lib (>= 14).

Unfortunately, in docker file that is used for gardio space after installing custom requirements.txt, there are going default installs that overwrite my websockets lib with the older version (12.0.1).

I think it’s one of this lines:

RUN pip install --no-cache-dir pip -U && 	pip install --no-cache-dir 	datasets 	"huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
RUN pip install --no-cache-dir 	gradio[oauth]==4.42.0 	"uvicorn>=0.14.0" 	spaces "fastapi<0.113.0"

So, I wanted to ask whether is possible to modify this default gardio dockerfile by myself or can you add a support for the newer version of websockets?

1 Like

gradio[oauth]==4.42.0

The culprit is probably in this line.

I don’t think it’s possible to customize the Docker image for the Gradio space in detail. Of course it is possible with the Docker space.

In the case of the Gradio space, if you change the sdk_version below, the Gradio version will also change, so if you use a newer version of Gradio, it should solve the problem. (Currently 5.20.0)
Well, Gradio has a lot of backward compatibility issues, so you’ll probably need to rewrite a few lines of the GUI code…

sdk_version : string
Specify the version of the selected SDK (Streamlit or Gradio).
All versions of Gradio are supported.
All versions of Streamlit from 0.79.0 are supported.