Dependencies and changing sdk of a space
Hello all,I am using googletrans in a space and it needs httpx 0.13.3 but huggingface overwrites the version at the end of the build.Is there a way to stop this?If not what happens if you change the sdk of a space? eg. changing to a docker space without making a new one.Language Learn Idea - a Hugging Face Space by KwabsHugContainer Log===== Application Startup at 2024-01-02 18:26:05 =====Traceback (most recent call last):File “/home/user/app/app.py”, line 1, infrom googletrans import TranslatorFile “/home/user/.local/lib/python3.10/site-packages/googletrans/init.py”, line 6, infrom googletrans.client import TranslatorFile “/home/user/.local/lib/python3.10/site-packages/googletrans/client.py”, line 27, inclass Translator:File “/home/user/.local/lib/python3.10/site-packages/googletrans/client.py”, line 57, in Translatorproxies: typing.Dict[str, httpcore.SyncHTTPTransport] = None,AttributeError: module ‘httpcore’ has no attribute ‘SyncHTTPTransport’Build LogsAttempting uninstall: httpxFound existing installation: httpx 0.13.3Uninstalling httpx-0.13.3:Successfully uninstalled httpx-0.13.3Attempting uninstall: gradio-clientFound existing installation: gradio_client 0.8.0Uninstalling gradio_client-0.8.0:Successfully uninstalled gradio_client-0.8.0Attempting uninstall: gradioFound existing installation: gradio 4.12.0Uninstalling gradio-4.12.0:Successfully uninstalled gradio-4.12.0ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.googletrans 3.1.0a0 requires httpx==0.13.3, but you have httpx 0.26.0 which is incompatible.Successfully installed authlib-1.3.0 cffi-1.16.0 cryptography-41.0.7 gradio-3.47.1 gradio-client-0.6.0 h11-0.14.0 httpcore-1.0.2 httpx-0.26.0 itsdangerous-2.1.2 psutil-5.9.7 pycparser-2.21 spaces-0.19.4
2024-01-02T23:14:39Z
hi@KwabsHug,In this case I recommend you using our Docker SDK and use this Gradio Dockerfile as referencehuggingface.coDockerfile · SpacesExamples/Gradio-Docker-Template at mainWe’re on a journey to advance and democratize artificial intelligence through open source and open science.
2024-01-03T06:24:19Z
Thanks for the file. I made another space to ensure the docker side is covered.I still am confused about changing the sdk on an existing space as I would like to keep the git history and url the same.
2024-01-03T06:32:09Z
you can still use the same Space, for a Docker Space you can change the yaml herehuggingface.coREADME.md · SpacesExamples/Gradio-Docker-Template at mainWe’re on a journey to advance and democratize artificial intelligence through open source and open science.set tosdk: dockerand of course, push a Dockerfile to the repo
2024-01-03T07:24:54Z
Thank You, very much. Problem solved Completely
2024-01-03T19:25:05Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.