alessandro trinca tornidor commited on
Commit
a71ae0b
·
1 Parent(s): bb9437b

doc: add a section about dependencies in gradio sdk spaces in README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -0
README.md CHANGED
@@ -57,3 +57,27 @@ Right now (July 2024) huggingface let use ZeroGPU Nvidia A100 GPUs.
57
 
58
  See [LISA](https://github.com/dvlab-research/LISA) for details on the original project.
59
  Note that the authors don't keep the project updated anymore.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  See [LISA](https://github.com/dvlab-research/LISA) for details on the original project.
59
  Note that the authors don't keep the project updated anymore.
60
+
61
+ ## Dependencies and HuggingFace demos with Gradio SDK
62
+
63
+ HuggingFace demos based on Gradio SDK (you need that to use ZeroGPU hardware) needs updated requirements.txt.
64
+ You can keep your requirements.txt in sync with the dependencies installed in the project using this python
65
+ command (from samgis-core):
66
+
67
+ ```bash
68
+ python -m samgis_core.utilities.update_requirements_txt --req_no_version_path requirements_no_versions.txt --req_output_path requirements.txt
69
+ ```
70
+
71
+ About the parameters:
72
+
73
+ - input argument `--req_no_version_path` is a file with the dependencies package list without version declared
74
+ - output argument `--req_output_path` is the output requirements.txt
75
+
76
+ This command simply freeze the installed packages and filter it using the dependencies package list from the input argument.
77
+ If you need to modify the `requirements_no_versions.txt` file, avoid inserting
78
+
79
+ - `python` (this is required only by `poetry`)
80
+ - `gradio`, `gradio-client` (installed directly by HuggingFace, selecting the version in header section of the README.md file)
81
+ - `spaces` (installed directly by HuggingFace, version selected connected by the gradio version)
82
+
83
+ In case of doubt check the HuggingFace container log for the correct `spaces` package version.