62 lines
2.2 KiB
Markdown
62 lines
2.2 KiB
Markdown
# Artifact Portability
|
|
|
|
Модели, RAG-корпусы, выгрузки ИТС, снапшоты метаданных и тренировочные наборы
|
|
не хранятся в git. При переносе проекта или запуске в Docker их нужно переносить
|
|
и монтировать отдельно.
|
|
|
|
## Build Manifest
|
|
|
|
```powershell
|
|
python scripts/build_llm_artifact_manifest.py --output reports/llm-artifact-manifest.json
|
|
```
|
|
|
|
По умолчанию manifest хранит размеры, количество файлов, расширения и sample
|
|
файлов. Хеширование больших моделей выключено, чтобы команда не была медленной.
|
|
Для более строгой проверки:
|
|
|
|
```powershell
|
|
python scripts/build_llm_artifact_manifest.py --hash-files --max-files 2000
|
|
```
|
|
|
|
## Check Manifest
|
|
|
|
На той же машине:
|
|
|
|
```powershell
|
|
python scripts/check_llm_artifact_manifest.py `
|
|
--manifest reports/llm-artifact-manifest.json `
|
|
--output reports/llm-artifact-check.json
|
|
```
|
|
|
|
После переноса в другой workspace:
|
|
|
|
```powershell
|
|
python scripts/check_llm_artifact_manifest.py `
|
|
--manifest reports/llm-artifact-manifest.json `
|
|
--target-root Z:/codex/LLM `
|
|
--output reports/llm-artifact-check.json
|
|
```
|
|
|
|
## Docker Volumes
|
|
|
|
Контейнеры не должны хранить эти данные во внутреннем слое. Монтируем внешние
|
|
папки:
|
|
|
|
```yaml
|
|
volumes:
|
|
- Z:/codex/LLM/models:/app/models
|
|
- Z:/codex/LLM/plugins/1c/datasets:/app/plugins/1c/datasets
|
|
- Z:/codex/LLM/plugins/1c/rag/sources:/app/plugins/1c/rag/sources
|
|
- Z:/codex/LLM/plugins/1c/rag/official-docs:/app/plugins/1c/rag/official-docs
|
|
- Z:/codex/LLM/plugins/1c/metadata/snapshots:/app/plugins/1c/metadata/snapshots
|
|
```
|
|
|
|
## Rule
|
|
|
|
Перед удалением контейнеров, переносом на другой host или пересборкой volumes:
|
|
|
|
1. Собрать manifest.
|
|
2. Скопировать artifact directories.
|
|
3. Проверить manifest на целевом пути.
|
|
4. Только потом запускать Docker services.
|