Huggingface docker python packages

Is there a list of python packages which come with the docker container for a Streamlit/Gradio space on huggingface?

Otherwise, how do we check for this? I am trying to avoid reinstalling packages in my requirements.txt if they are found in the docker container. Hopefully this will improve the build time for my Streamlit app.

1 Like

It seems like it should be there, but I can’t find it… The following is the result of using an extremely primitive method to obtain the dependencies for the Gradio 5.21.0 environment.

Package            Version
------------------ -----------
aiofiles           23.2.1
aiohappyeyeballs   2.6.1
aiohttp            3.11.13
aiosignal          1.3.2
annotated-types    0.7.0
anyio              4.8.0
async-timeout      5.0.1
attrs              25.3.0
Authlib            1.5.1
certifi            2025.1.31
cffi               1.17.1
charset-normalizer 3.4.1
click              8.0.4
cryptography       44.0.2
datasets           3.4.0
dill               0.3.8
exceptiongroup     1.2.2
fastapi            0.115.11
ffmpy              0.5.0
filelock           3.18.0
frozenlist         1.5.0
fsspec             2024.12.0
gradio             5.21.0
gradio_client      1.7.2
groovy             0.1.2
h11                0.14.0
hf_transfer        0.1.9
httpcore           1.0.7
httpx              0.28.1
huggingface-hub    0.29.3
idna               3.10
itsdangerous       2.2.0
Jinja2             3.1.6
markdown-it-py     3.0.0
MarkupSafe         2.1.5
mdurl              0.1.2
multidict          6.1.0
multiprocess       0.70.16
numpy              2.2.4
orjson             3.10.15
packaging          24.2
pandas             2.2.3
pillow             11.1.0
pip                25.0.1
propcache          0.3.0
protobuf           3.20.3
psutil             5.9.8
pyarrow            19.0.1
pycparser          2.22
pydantic           2.10.6
pydantic_core      2.27.2
pydub              0.25.1
Pygments           2.19.1
python-dateutil    2.9.0.post0
python-multipart   0.0.20
pytz               2025.1
PyYAML             6.0.2
requests           2.32.3
rich               13.9.4
ruff               0.11.0
safehttpx          0.1.6
semantic-version   2.10.0
setuptools         65.5.1
shellingham        1.5.4
six                1.17.0
sniffio            1.3.1
spaces             0.32.0
starlette          0.46.1
tomlkit            0.13.2
tqdm               4.67.1
typer              0.15.2
typing_extensions  4.12.2
tzdata             2025.1
urllib3            2.3.0
uvicorn            0.34.0
websockets         15.0.1
wheel              0.45.1
xxhash             3.5.0
yarl               1.18.3
import gradio as gr
import subprocess

o = subprocess.run("pip list", shell=True, check=False, capture_output=True)
piplist = o.stdout.decode().strip()

def test():
    return piplist

with gr.Blocks() as demo:
    run_button = gr.Button("Run", variant="primary")
    info = gr.Textbox(label="Output", value="", show_copy_button=True)
    run_button.click(test, None, [info])

demo.launch()
1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.