diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4e035ac --- /dev/null +++ b/.github/workflows/build.yml @@ -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 + diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7f395fb..c4fd444 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,8 +14,14 @@ name: "CodeQL" on: push: branches: [ "main" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' pull_request: branches: [ "main" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' schedule: - cron: '21 20 * * 6' diff --git a/.github/workflows/pip-audit.yml b/.github/workflows/pip-audit.yml new file mode 100644 index 0000000..953160d --- /dev/null +++ b/.github/workflows/pip-audit.yml @@ -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 + diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ccf57..25dfc12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,39 @@ # 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 diff --git a/README.md b/README.md index 90725ec..6747547 100644 --- a/README.md +++ b/README.md @@ -111,14 +111,14 @@ ## Localizations ## 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 +- Time estimation for quantization - Actual progress bar tracking - Perplexity testing -- Time estimation for quantization -- ~~`nvidia-smi` monitoring support~~ (added in v1.6.0) +- Web API and management (partially implemented in v1.6.2) ## Troubleshooting @@ -130,7 +130,7 @@ ## Contributing ## 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 diff --git a/SECURITY.md b/SECURITY.md index 797ebd0..ea0e18d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ ## Supported Versions | Version | Supported | | ----------------- | ------------------ | -| stable (v1.5.1) | :white_check_mark: | +| stable (v1.6.2) | :white_check_mark: | ## Reporting a Vulnerability