Commit e6ec12a3 authored by root's avatar root
Browse files

init

parent 0d660ddc
......@@ -27,7 +27,7 @@ def upload(local_path, repo_id, repo_type="model", force=False):
api=csg_api,
repo_id=use_full_repo_id,
repo_type=repo_type,
revision="v1",
revision="main",
endpoint=BASE_URL,
token=TOKEN
)
......@@ -36,7 +36,7 @@ def upload(local_path, repo_id, repo_type="model", force=False):
repo_id=use_full_repo_id,
local_path=local_path,
repo_type=repo_type,
revision="v1",
revision="main",
endpoint=BASE_URL,
token=TOKEN,
allow_patterns=None,
......
docker run -d --name model_download_manager \
-v /dcu_ai/models:/dcu_ai/models \
-v /dcu_ai/config-tools:/home/config \
-p 7865:7865 -w /workspace/new-moon -e PYTHONUNBUFFERED=1 -e MODEL_DOWNLOAD_CONFIG_FILE=/home/config/ty-config.yml \
--restart unless-stopped 10.17.27.227/dev/man-model:v4.0 \
bash -c "python3 model_download_manager.py"
auto_delete_after_upload: false
auto_upload_after_download: true
csghub:
base_url: http://10.17.27.227:4997
repo_type: model
revision: main
token: f5dad38a9426410aa861155cd184f84a
download:
max_concurrent: 1
max_retries: 10
retry_interval: 1
local:
config_db_path: config_db.json
default_model_path:
models_db_path: models_db.json
upload:
create_repo_default: true
num_workers: 1
auto_delete_after_upload: false
auto_upload_after_download: false
csghub:
base_url: http://10.20.100.5:4997
repo_type: model
revision: main
token: a2683e780fee4aa4b16cbedee0f75a45
download:
max_concurrent: 1
max_retries: 10
retry_interval: 1
local:
config_db_path: config_db.json
default_model_path: /dcu_ai/models
models_db_path: models_db.json
upload:
create_repo_default: true
num_workers: 1
pip install csghub-sdk==0.7.10
patch /usr/local/lib/python3.10/dist-packages/pycsghub/csghub_api.py < change_private.patch
sed -n '178,182p' /usr/local/lib/python3.10/dist-packages/pycsghub/csghub_api.py
pip3 install csghub-sdk==0.7.10
python3 auto_upload.py <model-file> --force
path=$(python3 -c "import pycsghub.csghub_api; print(pycsghub.csghub_api.__file__)" 2>/dev/null)
if [ -n "$path" ]; then
echo "path: $path"
else
# fallback: find using python3's site-packages
python3 -c "import site, os; packages = site.getsitepackages(); [print(os.path.join(p, 'pycsghub/csghub_api.py')) for p in packages if os.path.exists(os.path.join(p, 'pycsghub/csghub_api.py'))]" 2>/dev/null | head -1
fi
patch -N $path < change_private.patch
sed -n '178,182p' $path
python3 auto_upload.py /dcu_ai/models/FlagRelease/DeepSeek-V4-Flash-hygon-FlagOS --force
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment