Spaces:
Sleeping
Sleeping
marintosti12 commited on
Commit ·
bcac303
1
Parent(s): ccf0a60
fix(track) : track binaries files
Browse files- .github/workflows/deploy.yaml +21 -0
- .gitignore +7 -2
.github/workflows/deploy.yaml
CHANGED
|
@@ -44,6 +44,27 @@ jobs:
|
|
| 44 |
git config user.email "${HF_GIT_EMAIL:-actions@github.com}"
|
| 45 |
git config user.name "${HF_GIT_NAME:-github-actions}"
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
- name: Push to Space
|
| 48 |
run: |
|
| 49 |
SPACE_URL_AUTH=$(echo "$HF_SPACE_URL" | sed "s#https://#https://user:${HF_TOKEN}@#")
|
|
|
|
| 44 |
git config user.email "${HF_GIT_EMAIL:-actions@github.com}"
|
| 45 |
git config user.name "${HF_GIT_NAME:-github-actions}"
|
| 46 |
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
- name: Convert binaries to Git LFS
|
| 50 |
+
shell: bash
|
| 51 |
+
run: |
|
| 52 |
+
set -e
|
| 53 |
+
|
| 54 |
+
# 1) Activer LFS et déclarer les patterns de binaires
|
| 55 |
+
git lfs install
|
| 56 |
+
git lfs track "*.joblib" "*.pkl" "*.pt" "*.onnx"
|
| 57 |
+
git add .gitattributes
|
| 58 |
+
git commit -m "ci: track ML artifacts with LFS for Space push" || true
|
| 59 |
+
|
| 60 |
+
# 2) Réécrire l'historique LOCAL pour convertir les blobs en pointeurs LFS
|
| 61 |
+
# (ne modifie PAS ton repo GitHub car on ne pousse pas vers origin)
|
| 62 |
+
git lfs migrate import --everything --include="*.joblib,notebook/df.joblib,*.pkl,*.pt,*.onnx"
|
| 63 |
+
|
| 64 |
+
# 3) (Optionnel) vérifier l'état LFS
|
| 65 |
+
git lfs status || true
|
| 66 |
+
|
| 67 |
+
|
| 68 |
- name: Push to Space
|
| 69 |
run: |
|
| 70 |
SPACE_URL_AUTH=$(echo "$HF_SPACE_URL" | sed "s#https://#https://user:${HF_TOKEN}@#")
|
.gitignore
CHANGED
|
@@ -2,7 +2,6 @@
|
|
| 2 |
__pycache__/
|
| 3 |
*.py[codz]
|
| 4 |
*$py.class
|
| 5 |
-
*.joblib
|
| 6 |
|
| 7 |
# C extensions
|
| 8 |
*.so
|
|
@@ -214,4 +213,10 @@ marimo/_lsp/
|
|
| 214 |
__marimo__/
|
| 215 |
|
| 216 |
# Streamlit
|
| 217 |
-
.streamlit/secrets.toml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
__pycache__/
|
| 3 |
*.py[codz]
|
| 4 |
*$py.class
|
|
|
|
| 5 |
|
| 6 |
# C extensions
|
| 7 |
*.so
|
|
|
|
| 213 |
__marimo__/
|
| 214 |
|
| 215 |
# Streamlit
|
| 216 |
+
.streamlit/secrets.toml
|
| 217 |
+
|
| 218 |
+
# ML artifacts
|
| 219 |
+
*.joblib
|
| 220 |
+
*.pkl
|
| 221 |
+
*.pt
|
| 222 |
+
*.onnx
|