Commit Graph
25 Commits
Author SHA1 Message Date
Sander 15aed8c3bb Implement model path normalization and enhance security checks in API endpoints
Added a new helper function to normalize user-provided model paths, ensuring consistent handling of path separators and rejecting invalid paths. Updated the `remove_model` and `download_model` functions to utilize this normalization, improving security by validating paths against allowed directories and preventing directory traversal attacks. This enhances the robustness of file handling in the API.
2026-01-08 21:23:15 +01:00
Sander ea0b68bc8b Refactor download_model function to remove directory validation
Removed the directory validation logic from the download_model function in api_server.py, simplifying the file download process. Updated version to 1.1.3 in pyproject.toml to reflect changes.
v1.1.3
2026-01-06 10:14:13 +01:00
Sander 2196871d14 Add download endpoint for model files
Implemented a new API endpoint to allow downloading model files from the server. The endpoint includes validation for folder and model inputs, checks for file existence, and ensures that the requested file is within allowed directories. Updated the README to document the new endpoint and bumped the version to 1.1.2 in pyproject.toml.
v1.1.2
2026-01-06 10:09:15 +01:00
Sander 35abe441ce Merge pull request #3 from brantje/fix-name
Fix name
v1.1.1
2025-05-28 13:37:12 +02:00
brantje 28812c2c52 Bump version to 1.1.1 in pyproject.toml 2025-05-28 11:36:48 +00:00
brantje 267ff57680 Update filename key in model folder response
Changed the key from "name" to "filename" in the response structure of the get_model_folder function to better reflect the content being returned. This improves clarity in the API response.
2025-05-28 11:36:20 +00:00
Sander 5cece05f49 Merge pull request #2 from brantje/more-metrics
More metrics
v1.1.0
2025-05-23 10:24:25 +02:00
brantje 533e8e920c Revert "Update metrics/prometheus.py"
This reverts commit 5965afc47c.
2025-05-23 08:23:40 +00:00
SanderandCopilot 5965afc47c Update metrics/prometheus.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-23 10:20:48 +02:00
brantje 3e014106ef Bump version to 1.1.0 in pyproject.toml 2025-05-23 07:10:46 +00:00
brantje 93af1483f7 Add PyTorch version metrics to Prometheus monitoring
Enhanced the MetricsRegistry class to include PyTorch version information if the library is available. This addition allows for better tracking of the PyTorch environment in the monitoring metrics.
2025-05-23 07:09:57 +00:00
Sander c10561e1df Enhance Prometheus metrics by adding system memory and disk usage gauges. Updated the MetricsRegistry class to track free and total memory, memory usage percentage, and disk space metrics, improving overall monitoring capabilities. 2025-05-23 09:01:20 +02:00
Sander 465d9d7500 Merge pull request #1 from brantje/add-token
Add token
v1.0.9
2025-04-24 21:53:30 +02:00
Sander 15fb50fb34 Bump version to 1.0.9 in pyproject.toml 2025-04-24 21:52:55 +02:00
Sander 5d7de7952d Enhanced download function to support optional authorization token
Updated the `download_url_with_agent` function to accept an optional `token` parameter for authorization headers. This allows for more secure downloads when required. Adjusted the model installation process to utilize the token from the JSON data if available.
2025-04-24 21:41:05 +02:00
brantje 07593db64d "Bumped version to 1.0.8 — because why not?"
Explanation: Updated the version in two places to 1.0.8. Clearly, this monumental change required all my focus and skill. It's the software equivalent of changing a light bulb.
v1.0.8
2025-04-12 09:49:24 +00:00
brantje 00558f031d "Fixed the success_resp overshare. Less is more."
Apparently, success_resp didn’t need a message—it was doing just fine without it. Cleaned it up so it stops oversharing like that one friend at brunch. You're welcome, future me.
2025-04-12 09:48:43 +00:00
brantje 182370df6d "Added Prometheus metrics table to README. Monitor away!"
What I did: Documented Prometheus metrics for the server in the README. Because everyone likes pretty tables and knowing exactly how they're breaking their hardware.

Snark level: I didn't break the server (this time). You're welcome!
2025-04-12 09:42:24 +00:00
brantje 143ed09a72 "Version bump: Because 1.0.6 just wasn't cool enough"
Explanation:
Finally bumped the version numbers in `pyproject.toml` to 1.0.7. Clearly, 1.0.6 was living its best life, but we had to let it go like Rose did Jack in Titanic. Onwards and upwards!
v1.0.7
2025-04-12 09:35:32 +00:00
brantje 469d2ddf3f Refactor GPU info module and improve import handling
Revised the `gpu_info` module by wrapping imports in a try-except block to log potential import errors. Removed unused `__init__.py` from the core directory.
2025-04-12 09:30:34 +00:00
brantje eef0bcac74 "Added model installer: URL checks & bad domain burns 🔥"
Because everyone loves a good install tool, I slapped together a route to magically fetch models from an *allowed* URL list. Turns out the internet is still scary, so I threw in domain checks to keep things wholesome. It's not perfect, but hey, neither am I.
2025-04-12 08:37:26 +00:00
brantje 18ced3e628 "Added model installer & logged GPUs like a responsible adult"
Assembled a shiny new `install.py` for model downloads because apparently, URLs don’t click themselves. Snuck in a logging import in `gpu_info.py`—because who doesn’t love responsible debugging?
2025-04-12 08:24:52 +00:00
brantje 2e18df62d5 "Bye diskcache, hello pynvml – GPU life matters now"
Swapped out `diskcache` for `pynvml` because apparently, managing GPU stuff is more exciting than caching. The dependency list also went on a diet – one less thing to pretend I understand.
2025-04-09 20:13:46 +00:00
brantje 4c5e1ed217 "Resurrected CI workflow. Oops, wrong folder, my bad." 2025-04-09 20:10:48 +00:00
brantje a2454c39e7 "Added API, metrics & logging while juggling chainsaws"
Love API? Me too. Added a robust API for model and image handling, sprinkled in Prometheus metrics for fun graphs, and tossed in colorful logging because why not? Pretty sure I even taught it to make coffee (spoiler: it doesn’t). All aboard the functionality express! 🚂
2025-04-09 20:09:52 +00:00