private-gpt: drop (#429137)
This commit is contained in:
@@ -62,6 +62,8 @@
|
||||
|
||||
- NixOS display manager modules now strictly use tty1, where many of them previously used tty7. Options to configure display managers' VT have been dropped. A configuration with a display manager enabled will not start `getty@tty1.service`, even if the system is forced to boot into `multi-user.target` instead of `graphical.target`.
|
||||
|
||||
- [private-gpt](https://github.com/zylon-ai/private-gpt) service has been removed by lack of maintenance upstream.
|
||||
|
||||
## Other Notable Changes {#sec-nixpkgs-release-25.11-notable-changes}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
@@ -158,7 +158,7 @@ The pre-existing `services.ankisyncd` has been marked deprecated and will be dro
|
||||
|
||||
- [pretalx](https://github.com/pretalx/pretalx), a conference planning tool. Available as [services.pretalx](#opt-services.pretalx.enable).
|
||||
|
||||
- [private-gpt](https://github.com/zylon-ai/private-gpt), a service to interact with your documents using the power of LLMs, 100% privately, no data leaks. Available as [services.private-gpt](#opt-services.private-gpt.enable).
|
||||
- [private-gpt](https://github.com/zylon-ai/private-gpt), a service to interact with your documents using the power of LLMs, 100% privately, no data leaks.
|
||||
|
||||
- [Prometheus DNSSEC Exporter](https://github.com/chrj/prometheus-dnssec-exporter): check for validity and expiration in DNSSEC signatures and expose metrics for Prometheus. Available as [services.prometheus.exporters.dnssec](#opt-services.prometheus.exporters.dnssec.enable).
|
||||
|
||||
|
||||
@@ -131,6 +131,8 @@
|
||||
|
||||
- The `wstunnel` module was converted to RFC42-style settings, you will need to update your NixOS config if you make use of this module.
|
||||
|
||||
- [private-gpt](https://github.com/zylon-ai/private-gpt) service has been removed by lack of maintenance upstream.
|
||||
|
||||
## Other Notable Changes {#sec-release-25.11-notable-changes}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
@@ -897,7 +897,6 @@
|
||||
./services/misc/polaris.nix
|
||||
./services/misc/portunus.nix
|
||||
./services/misc/preload.nix
|
||||
./services/misc/private-gpt.nix
|
||||
./services/misc/pufferpanel.nix
|
||||
./services/misc/pykms.nix
|
||||
./services/misc/radicle.nix
|
||||
|
||||
@@ -348,7 +348,9 @@ in
|
||||
The signald project is unmaintained and has long been incompatible with the
|
||||
official Signal servers.
|
||||
'')
|
||||
|
||||
(mkRemovedOptionModule [ "services" "private-gpt" ] ''
|
||||
The private-gpt package and the corresponding module have been removed due to being broken and unmaintained.
|
||||
'')
|
||||
# Do NOT add any option renames here, see top of the file
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) types;
|
||||
|
||||
format = pkgs.formats.yaml { };
|
||||
cfg = config.services.private-gpt;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.private-gpt = {
|
||||
enable = lib.mkEnableOption "private-gpt for local large language models";
|
||||
package = lib.mkPackageOption pkgs "private-gpt" { };
|
||||
|
||||
stateDir = lib.mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/private-gpt";
|
||||
description = "State directory of private-gpt.";
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = format.type;
|
||||
default = {
|
||||
llm = {
|
||||
mode = "ollama";
|
||||
tokenizer = "";
|
||||
};
|
||||
embedding = {
|
||||
mode = "ollama";
|
||||
};
|
||||
ollama = {
|
||||
llm_model = "llama3";
|
||||
embedding_model = "nomic-embed-text";
|
||||
api_base = "http://localhost:11434";
|
||||
embedding_api_base = "http://localhost:11434";
|
||||
keep_alive = "5m";
|
||||
tfs_z = 1;
|
||||
top_k = 40;
|
||||
top_p = 0.9;
|
||||
repeat_last_n = 64;
|
||||
repeat_penalty = 1.2;
|
||||
request_timeout = 120;
|
||||
};
|
||||
vectorstore = {
|
||||
database = "qdrant";
|
||||
};
|
||||
qdrant = {
|
||||
path = "/var/lib/private-gpt/vectorstore/qdrant";
|
||||
};
|
||||
data = {
|
||||
local_data_folder = "/var/lib/private-gpt";
|
||||
};
|
||||
openai = { };
|
||||
azopenai = { };
|
||||
};
|
||||
description = ''
|
||||
settings-local.yaml for private-gpt
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.private-gpt = {
|
||||
description = "Interact with your documents using the power of GPT, 100% privately, no data leaks";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
preStart =
|
||||
let
|
||||
config = format.generate "settings-local.yaml" (cfg.settings // { server.env_name = "local"; });
|
||||
in
|
||||
''
|
||||
mkdir -p ${cfg.stateDir}/{settings,huggingface,matplotlib,tiktoken_cache}
|
||||
cp ${cfg.package.cl100k_base.tiktoken} ${cfg.stateDir}/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4
|
||||
cp ${pkgs.python3Packages.private-gpt}/${pkgs.python3.sitePackages}/private_gpt/settings.yaml ${cfg.stateDir}/settings/settings.yaml
|
||||
cp "${config}" "${cfg.stateDir}/settings/settings-local.yaml"
|
||||
chmod 600 "${cfg.stateDir}/settings/settings-local.yaml"
|
||||
'';
|
||||
|
||||
environment = {
|
||||
PGPT_PROFILES = "local";
|
||||
PGPT_SETTINGS_FOLDER = "${cfg.stateDir}/settings";
|
||||
HF_HOME = "${cfg.stateDir}/huggingface";
|
||||
TRANSFORMERS_OFFLINE = "1";
|
||||
HF_DATASETS_OFFLINE = "1";
|
||||
MPLCONFIGDIR = "${cfg.stateDir}/matplotlib";
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
WorkingDirectory = cfg.stateDir;
|
||||
StateDirectory = "private-gpt";
|
||||
RuntimeDirectory = "private-gpt";
|
||||
RuntimeDirectoryMode = "0755";
|
||||
PrivateTmp = true;
|
||||
DynamicUser = true;
|
||||
DevicePolicy = "closed";
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
PrivateUsers = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectControlGroups = true;
|
||||
ProcSubset = "pid";
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
SystemCallArchitectures = "native";
|
||||
UMask = "0077";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = [ ];
|
||||
}
|
||||
@@ -1226,7 +1226,6 @@ in
|
||||
_module.args.socket = false;
|
||||
_module.args.listenTcp = false;
|
||||
};
|
||||
private-gpt = runTest ./private-gpt.nix;
|
||||
privatebin = runTest ./privatebin.nix;
|
||||
privoxy = runTest ./privoxy.nix;
|
||||
prometheus = import ./prometheus { inherit runTest; };
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
mainPort = "8001";
|
||||
in
|
||||
{
|
||||
name = "private-gpt";
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ ... }:
|
||||
{
|
||||
services.private-gpt = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.start()
|
||||
|
||||
machine.wait_for_unit("private-gpt.service")
|
||||
machine.wait_for_open_port(${mainPort})
|
||||
|
||||
machine.succeed("curl http://127.0.0.1:${mainPort}")
|
||||
'';
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
python3Packages,
|
||||
makeBinaryWrapper,
|
||||
}:
|
||||
|
||||
python3Packages.toPythonApplication (
|
||||
python3Packages.private-gpt.overrideAttrs (oldAttrs: {
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ makeBinaryWrapper ];
|
||||
|
||||
passthru = (oldAttrs.passthru or { }) // {
|
||||
cl100k_base = {
|
||||
inherit (python3Packages.private-gpt.cl100k_base) tiktoken;
|
||||
};
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
makeWrapper ${python3Packages.python.interpreter} $out/bin/private-gpt \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
--add-flags "-m private_gpt"
|
||||
'';
|
||||
})
|
||||
)
|
||||
@@ -1,112 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
|
||||
# build-system
|
||||
poetry-core,
|
||||
|
||||
# dependencies
|
||||
cryptography,
|
||||
docx2txt,
|
||||
fastapi,
|
||||
injector,
|
||||
llama-index-core,
|
||||
llama-index-readers-file,
|
||||
python-multipart,
|
||||
pyyaml,
|
||||
transformers,
|
||||
watchdog,
|
||||
|
||||
# optional-dependencies
|
||||
python,
|
||||
huggingface-hub,
|
||||
gradio,
|
||||
|
||||
# tests
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "private-gpt";
|
||||
version = "0.6.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zylon-ai";
|
||||
repo = "private-gpt";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-IYTysU3W/NrtBuLe3ZJkztVSK+gzjkGIg0qcBYzB3bs=";
|
||||
};
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"cryptography"
|
||||
"docx2txt"
|
||||
"fastapi"
|
||||
"llama-index-core"
|
||||
"llama-index-readers-file"
|
||||
"python-multipart"
|
||||
"watchdog"
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
cryptography
|
||||
docx2txt
|
||||
fastapi
|
||||
injector
|
||||
llama-index-core
|
||||
llama-index-readers-file
|
||||
python-multipart
|
||||
pyyaml
|
||||
transformers
|
||||
watchdog
|
||||
]
|
||||
++ lib.flatten (builtins.attrValues optional-dependencies);
|
||||
|
||||
# This is needed for running the tests and the service in offline mode,
|
||||
# See related issue at https://github.com/zylon-ai/private-gpt/issues/1870
|
||||
passthru.cl100k_base.tiktoken = fetchurl {
|
||||
url = "https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken";
|
||||
hash = "sha256-Ijkht27pm96ZW3/3OFE+7xAPtR0YyTWXoRO8/+hlsqc=";
|
||||
};
|
||||
|
||||
optional-dependencies = with python.pkgs; {
|
||||
embeddings-huggingface = [
|
||||
huggingface-hub
|
||||
llama-index-embeddings-huggingface
|
||||
];
|
||||
embeddings-ollama = [ llama-index-embeddings-ollama ];
|
||||
embeddings-openai = [ llama-index-embeddings-openai ];
|
||||
embeddings-sagemaker = [ boto3 ];
|
||||
llms-ollama = [ llama-index-llms-ollama ];
|
||||
llms-openai = [ llama-index-llms-openai ];
|
||||
llms-openai-like = [ llama-index-llms-openai-like ];
|
||||
llms-sagemaker = [ boto3 ];
|
||||
ui = [ gradio ];
|
||||
vector-stores-chroma = [ llama-index-vector-stores-chroma ];
|
||||
vector-stores-postgres = [ llama-index-vector-stores-postgres ];
|
||||
vector-stores-qdrant = [ llama-index-vector-stores-qdrant ];
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
cp settings*.yaml $out/${python.sitePackages}/private_gpt/
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "private_gpt" ];
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) private-gpt;
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/zylon-ai/private-gpt/blob/${src.rev}/CHANGELOG.md";
|
||||
description = "Interact with your documents using the power of GPT, 100% privately, no data leaks";
|
||||
homepage = "https://github.com/zylon-ai/private-gpt";
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "private-gpt";
|
||||
maintainers = with lib.maintainers; [ GaetanLepage ];
|
||||
};
|
||||
}
|
||||
@@ -1666,6 +1666,7 @@ mapAliases {
|
||||
premake3 = throw "'premake3' has been removed since it is unmaintained. Consider using 'premake' instead"; # Added 2025-05-10
|
||||
prismlauncher-qt5 = throw "'prismlauncher-qt5' has been removed from nixpkgs. Please use 'prismlauncher'"; # Added 2024-04-20
|
||||
prismlauncher-qt5-unwrapped = throw "'prismlauncher-qt5-unwrapped' has been removed from nixpkgs. Please use 'prismlauncher-unwrapped'"; # Added 2024-04-20
|
||||
private-gpt = throw "'private-gpt' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2025-07-28
|
||||
probe-rs = probe-rs-tools; # Added 2024-05-23
|
||||
probe-run = throw "probe-run is deprecated upstream. Use probe-rs instead."; # Added 2024-05-23
|
||||
prometheus-dmarc-exporter = dmarc-metrics-exporter; # added 2022-05-31
|
||||
|
||||
@@ -11932,8 +11932,6 @@ self: super: with self; {
|
||||
|
||||
prison = callPackage ../development/python-modules/prison { };
|
||||
|
||||
private-gpt = callPackage ../development/python-modules/private-gpt { };
|
||||
|
||||
process-tests = callPackage ../development/python-modules/process-tests { };
|
||||
|
||||
procmon-parser = callPackage ../development/python-modules/procmon-parser { };
|
||||
|
||||
Reference in New Issue
Block a user