This commit is contained in:
BuildTools 2024-08-15 19:02:42 -07:00
commit 3946b2a49e
No known key found for this signature in database
GPG Key ID: 3270C066C15D530B
6 changed files with 181 additions and 6 deletions

77
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,77 @@
name: Build AutoGGUF (PyInstaller)
on:
workflow_dispatch:
inputs:
build_type:
description: 'Build type (RELEASE or DEV)'
required: true
default: 'RELEASE'
type: choice
options:
- RELEASE
- DEV
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install $(grep -v "^torch" requirements.txt)
pip install pyinstaller pillow
- name: Build with PyInstaller (Windows)
if: matrix.os == 'windows-latest'
run: |
if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") {
pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\release\dist --workpath=build\release\build --specpath=build\release src\main.py
} else {
pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\dev\dist --workpath=build\dev\build --specpath=build\dev src\main.py
}
- name: Build with PyInstaller (Linux/macOS)
if: matrix.os != 'windows-latest'
run: |
if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then
pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/release/dist --workpath=build/release/build --specpath=build/release src/main.py
else
pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/dev/dist --workpath=build/dev/build --specpath=build/dev src/main.py
fi
- name: Copy additional files (Windows)
if: matrix.os == 'windows-latest'
run: |
$distPath = if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") { "build\release\dist" } else { "build\dev\dist" }
New-Item -ItemType Directory -Force -Path "$distPath\src\gguf-py"
Copy-Item -Path "src\gguf-py\*" -Destination "$distPath\src\gguf-py" -Recurse
Copy-Item -Path "src\convert_lora_to_gguf.py" -Destination "$distPath\src"
Copy-Item -Path "src\convert_lora_to_ggml.py" -Destination "$distPath\src"
- name: Copy additional files (Linux/macOS)
if: matrix.os != 'windows-latest'
run: |
distPath=$(if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then echo "build/release/dist"; else echo "build/dev/dist"; fi)
mkdir -p $distPath/src/gguf-py
cp -R src/gguf-py/* $distPath/src/gguf-py/
cp src/convert_lora_to_gguf.py $distPath/src/
cp src/convert_lora_to_ggml.py $distPath/src/
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist

View File

@ -14,8 +14,14 @@ name: "CodeQL"
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
pull_request: pull_request:
branches: [ "main" ] branches: [ "main" ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
schedule: schedule:
- cron: '21 20 * * 6' - cron: '21 20 * * 6'

59
.github/workflows/pip-audit.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: Dependency Audit
on:
push:
paths:
- '**/requirements.txt'
pull_request:
paths:
- '**/requirements.txt'
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pip-audit
- name: Run pip-audit
run: |
pip-audit -r requirements.txt > audit_output.txt
continue-on-error: true
- name: Display audit results
run: cat audit_output.txt
- name: Create detailed report
run: |
echo "Pip Audit Report" > detailed_report.txt
echo "==================" >> detailed_report.txt
echo "" >> detailed_report.txt
echo "Date: $(date)" >> detailed_report.txt
echo "" >> detailed_report.txt
echo "Audit Results:" >> detailed_report.txt
cat audit_output.txt >> detailed_report.txt
echo "" >> detailed_report.txt
echo "Environment:" >> detailed_report.txt
python --version >> detailed_report.txt
pip --version >> detailed_report.txt
echo "" >> detailed_report.txt
echo "Requirements:" >> detailed_report.txt
cat requirements.txt >> detailed_report.txt
- name: Upload audit results
uses: actions/upload-artifact@v2
with:
name: pip-audit-report
path: detailed_report.txt

View File

@ -1,6 +1,39 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. ## [v1.6.2] - 2024-08-15
### Added
- Server functionality with new endpoints:
- `/v1/backends`: Lists all backends and their paths
- `/v1/health`: Heartbeat endpoint
- `/v1/tasks`: Provides current task info (name, status, progress, log file)
- `/v1/models`: Retrieves model details (name, type, path, shard status)
- Environment variable support for server configuration:
- `AUTOGGUF_SERVER`: Enable/disable server (true/false)
- `AUTOGGUF_SERVER_PORT`: Set server port (integer)
### Changed
- Updated AutoGGUF docstrings
- Refactored build scripts
### Fixed
- Set GGML types to lowercase in command builder
## [v1.6.1] - 2024-08-12
### Added
- Optimized build scripts
- Nuitka for building
### Changed
- Updated .gitignore
### Fixed
- Bug where deletion while a task is running crashes the program
### Notes
- Fast build: Higher unzipped size (97MB), smaller download (38MB)
- Standard build: Created with PyInstaller, medium download and unzipped size (50MB), potentially slower
## [1.6.0] - 2024-08-08 ## [1.6.0] - 2024-08-08

View File

@ -111,14 +111,14 @@ ## Localizations
## Known Issues ## Known Issues
- Cannot delete task while processing (planned fix: disallow deletion before cancelling or cancel automatically) - ~~Cannot delete task while processing (planned fix: disallow deletion before cancelling or cancel automatically)~~ (fixed in v1.6.2)
## Planned Features ## Planned Features
- Time estimation for quantization
- Actual progress bar tracking - Actual progress bar tracking
- Perplexity testing - Perplexity testing
- Time estimation for quantization - Web API and management (partially implemented in v1.6.2)
- ~~`nvidia-smi` monitoring support~~ (added in v1.6.0)
## Troubleshooting ## Troubleshooting
@ -130,7 +130,7 @@ ## Contributing
## User Interface ## User Interface
![image](https://github.com/user-attachments/assets/a327afb9-950d-420b-b07f-46658ffb0822) ![rsz_1autogguf-v162-screenshot-blue](https://github.com/user-attachments/assets/0e69dd3d-95b0-4bc6-b29e-df308bf027c4)
## Stargazers ## Stargazers

View File

@ -4,7 +4,7 @@ ## Supported Versions
| Version | Supported | | Version | Supported |
| ----------------- | ------------------ | | ----------------- | ------------------ |
| stable (v1.5.1) | :white_check_mark: | | stable (v1.6.2) | :white_check_mark: |
## Reporting a Vulnerability ## Reporting a Vulnerability