Changed requirement to python 3.10 (#3496)

### What problem does this PR solve?

Changed requirement to python 3.10.
Changed image base to Ubuntu 22.04 since it contains python 3.10.

### Type of change

- [x] Refactoring
This commit is contained in:
Zhichang Yu
2024-11-19 18:25:04 +08:00
committed by GitHub
parent 16fbe9920d
commit 0cd5b64c3b
8 changed files with 203 additions and 141 deletions

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3
from os import rename
from huggingface_hub import snapshot_download
import nltk
@ -11,6 +10,8 @@ urls = [
"https://repo1.maven.org/maven2/org/apache/tika/tika-server-standard/3.0.0/tika-server-standard-3.0.0.jar",
"https://repo1.maven.org/maven2/org/apache/tika/tika-server-standard/3.0.0/tika-server-standard-3.0.0.jar.md5",
"https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken",
"https://bit.ly/chrome-linux64-121-0-6167-85",
"https://bit.ly/chromedriver-linux64-121-0-6167-85",
]
repos = [
@ -43,5 +44,3 @@ if __name__ == "__main__":
for repo_id in repos:
print(f"Downloading huggingface repo {repo_id}...")
download_model(repo_id)
rename("cl100k_base.tiktoken", "9b5ad71b2ce5302211f9c61530b329a4922fc6a4")