forked from DGNum/infrastructure
Compare commits
6 commits
npins-upda
...
main
Author | SHA1 | Date | |
---|---|---|---|
f20353b727 | |||
a4de5f4d31 | |||
363f8d3c67 | |||
12b20e6acf | |||
de6742aa0d | |||
d76e655174 |
5 changed files with 65 additions and 8 deletions
|
@ -21,6 +21,7 @@ lib.extra.mkConfig {
|
|||
"librenms"
|
||||
"mastodon"
|
||||
"nextcloud"
|
||||
"ollama-proxy"
|
||||
"outline"
|
||||
"plausible"
|
||||
"postgresql"
|
||||
|
|
27
machines/compute01/ollama-proxy.nix
Normal file
27
machines/compute01/ollama-proxy.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
pkgs,
|
||||
nodes,
|
||||
meta,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts."ollama01.beta.dgnum.eu" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${meta.network.krz01.netbirdIp}:${toString nodes.krz01.config.services.ollama.port}";
|
||||
basicAuthFile = pkgs.writeText "ollama-htpasswd" ''
|
||||
raito:$y$j9T$UDEHpLtM52hRGK0I4qT6M0$N75AhENLqgtJnTGaPzq51imhjZvuPr.ow81Co1ZTcX2
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
}
|
|
@ -2,6 +2,8 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
meta,
|
||||
name,
|
||||
...
|
||||
}:
|
||||
|
||||
|
@ -12,11 +14,11 @@ lib.extra.mkConfig {
|
|||
|
||||
enabledServices = [
|
||||
# INFO: This list needs to stay sorted alphabetically
|
||||
# Machine learning API machine
|
||||
"microvm-ml01"
|
||||
"microvm-router01"
|
||||
"nvidia-tesla-k80"
|
||||
"proxmox"
|
||||
# Machine learning API machine
|
||||
"microvm-ml01"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
|
@ -57,14 +59,20 @@ lib.extra.mkConfig {
|
|||
];
|
||||
}))
|
||||
];
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
package = pkgs.callPackage ./ollama.nix {
|
||||
cudaPackages = pkgs.cudaPackages_11;
|
||||
# We need to thread our nvidia x11 driver for CUDA.
|
||||
extraLibraries = [ config.hardware.nvidia.package ];
|
||||
|
||||
services = {
|
||||
ollama = {
|
||||
enable = true;
|
||||
host = meta.network.${name}.netbirdIp;
|
||||
package = pkgs.callPackage ./ollama.nix {
|
||||
cudaPackages = pkgs.cudaPackages_11;
|
||||
# We need to thread our nvidia x11 driver for CUDA.
|
||||
extraLibraries = [ config.hardware.nvidia.package ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.interfaces.wt0.allowedTCPPorts = [ config.services.ollama.port ];
|
||||
};
|
||||
|
||||
root = ./.;
|
||||
|
|
|
@ -15,6 +15,8 @@ let
|
|||
];
|
||||
|
||||
buckets = [
|
||||
"monorepo-terraform-state"
|
||||
|
||||
"banda-website"
|
||||
"castopod-dgnum"
|
||||
"hackens-website"
|
||||
|
@ -77,6 +79,17 @@ in
|
|||
users.groups.garage = { };
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"s3-admin.dgnum.eu" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/".extraConfig = ''
|
||||
proxy_pass http://127.0.0.1:3903;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
|
||||
${host} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
|
@ -68,6 +68,12 @@ let
|
|||
"support" # Zammad support
|
||||
"telegraf" # Telegraf
|
||||
|
||||
# Beta-grade machine learning API servers
|
||||
"ollama01.beta"
|
||||
"openui.beta"
|
||||
"whisper.beta"
|
||||
"stable-diffusion.beta"
|
||||
|
||||
# DGSI
|
||||
"dgsi"
|
||||
"profil"
|
||||
|
@ -87,6 +93,8 @@ let
|
|||
"*.s3"
|
||||
"cdn"
|
||||
"s3"
|
||||
# The administration endpoint for Garage.
|
||||
"s3-admin"
|
||||
];
|
||||
|
||||
rescue01.dual = [
|
||||
|
|
Loading…
Reference in a new issue