Merge pull request #4 from nixified-ai/website

website: init
This commit is contained in:
Matthew Croughan 2023-02-28 01:57:30 +00:00 committed by GitHub
commit 63726855f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 337 additions and 2 deletions

View file

@ -20,6 +20,100 @@
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1673362319,
"narHash": "sha256-Pjp45Vnj7S/b3BRpZEVfdu8sqqA6nvVjvYu59okhOyI=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "82c16f1682cf50c01cb0280b38a1eed202b3fe9f",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"hercules-ci-effects",
"hercules-ci-agent",
"nixpkgs"
]
},
"locked": {
"lastModified": 1666885127,
"narHash": "sha256-uXA/3lhLhwOTBMn9a5zJODKqaRT+SuL5cpEmOz2ULoo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "0e101dbae756d35a376a5e1faea532608e4a4b9a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667077288,
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"hercules-ci-agent": {
"inputs": {
"flake-parts": "flake-parts_3",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs",
"pre-commit-hooks-nix": "pre-commit-hooks-nix"
},
"locked": {
"lastModified": 1673183923,
"narHash": "sha256-vb+AEQJAW4Xn4oHsfsx8H12XQU0aK8VYLtWYJm/ol28=",
"owner": "hercules-ci",
"repo": "hercules-ci-agent",
"rev": "b3f8aa8e4a8b22dbbe92cc5a89e6881090b933b3",
"type": "github"
},
"original": {
"id": "hercules-ci-agent",
"type": "indirect"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_2",
"hercules-ci-agent": "hercules-ci-agent",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1676558019,
"narHash": "sha256-obUHCMMWbffb3k0b9YIChsJ2Z281BcDYnTPTbJRP6vs=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "fdbc15b55db8d037504934d3af52f788e0593380",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"invokeai-src": {
"flake": false,
"locked": {
@ -54,7 +148,78 @@
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"hercules-ci-effects",
"hercules-ci-agent",
"nixpkgs"
]
},
"locked": {
"lastModified": 1667419884,
"narHash": "sha256-oLNw87ZI5NxTMlNQBv1wG2N27CUzo9admaFlnmavpiY=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "cfc0125eafadc9569d3d6a16ee928375b77e3100",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672262501,
"narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1672350804,
"narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1673760129,
"narHash": "sha256-m8JdWtElEMd4TY5eUUTbw+3yEjImsE9ifo/UVSbdU7g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e8e9febf8bc4e90f1b38d3b22a704d347a99a74a",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1675763311,
"narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=",
@ -70,12 +235,36 @@
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"hercules-ci-effects",
"hercules-ci-agent",
"nixpkgs"
]
},
"locked": {
"lastModified": 1667760143,
"narHash": "sha256-+X5CyeNEKp41bY/I1AJgW/fn69q5cLJ1bgiaMMCKB3M=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "06f48d63d473516ce5b8abe70d15be96a0147fcd",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"hercules-ci-effects": "hercules-ci-effects",
"invokeai-src": "invokeai-src",
"koboldai-src": "koboldai-src",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_3"
}
}
},

View file

@ -22,17 +22,23 @@
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
hercules-ci-effects = {
url = "github:hercules-ci/hercules-ci-effects";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs = { flake-parts, invokeai-src, ... }@inputs:
outputs = { flake-parts, invokeai-src, hercules-ci-effects, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
];
imports = [
hercules-ci-effects.flakeModule
./modules/dependency-sets
./modules/aipython3
./projects/invokeai
./projects/koboldai
./website
];
};
}

9
website/default.nix Normal file
View file

@ -0,0 +1,9 @@
{
hercules-ci.github-pages.branch = "master";
perSystem = { pkgs, config, ... }: {
hercules-ci.github-pages.settings.contents = config.packages.website.webroot;
packages = {
website = pkgs.callPackage ./package.nix { };
};
};
}

30
website/package.nix Normal file
View file

@ -0,0 +1,30 @@
{ lib, pandoc, stdenvNoCC }:
lib.fix (self: stdenvNoCC.mkDerivation {
pname = "nixified-ai-website";
version = "1.0.0";
src = ./src;
nativeBuildInputs = [
pandoc
];
buildCommand = ''
unpackPhase
cd $sourceRoot
pandoc \
--css=./styles.css \
-H header.html \
-V pagetitle='Nixified AI' \
-s index.md \
-o index.html
webroot=$out/share/www/nixified.ai
mkdir -p $webroot
cp -v index.html *.css *.png CNAME $webroot
'';
passthru.webroot = "${self}/share/www/nixified.ai";
})

1
website/src/CNAME Normal file
View file

@ -0,0 +1 @@
nixified.ai

1
website/src/header.html Normal file
View file

@ -0,0 +1 @@
<link rel="icon" type="image/png" href="./nixified-ai-icon.png">

63
website/src/index.md Normal file
View file

@ -0,0 +1,63 @@
<p align="center">
<br/>
<a href="https://nixified.ai">
<img src="https://raw.githubusercontent.com/nixified-ai/flake/images/nixified.ai-text.png" width=60% height=60% title="nixified.ai"/>
</a>
</p>
---
## Making AI reproducible and easy to run
The goal of nixified.ai is to simplify and make available a large repository of
AI executable code that would otherwise be impractical to run yourself, due to
package management and complexity issues.
- Self-contained, without containers:
- Each AI project in the repository is packaged as a self-contained Nix package, including all the necessary dependencies to run the code. This guarantees that you don't have to worry about version conflicts, missing dependencies, or the state of your operating system. Nix uses an approach different from containers, which eliminates the need for complex container runtimes or virtualization.
- Easy to contribute to:
- nixified.ai is an open-source project that welcomes contributions from the community. If there is a project you think you could help with packaging, or want packaged, then please [make an issue on GitHub](https://github.com/nixified-ai/flake/issues)
- Reproducible
- By using a reproducible build process, nixified.ai aims to provide users with the ability to confidently run AI workloads in the long term, without worrying about the shifting sands of the software ecosystem
- Built from source
- Each AI project in the repository is built from source, along with all of its input dependencies, ensuring that the code is reproducible and can be trusted. Nix allows advanced users to customize and modify the build process at any granularity if desired.
- Cached
- Thanks to a Nix concept called "Binary Substitution", any `nix` command ran by the user will not need to be built from source unless they have made modifications to the source code. This is because when code is built by our CI [(Hercules CI)](https://hercules-ci.com), it is pushed to cachix.org, where it can be pulled by any `nix` client like a traditional binary distribution. If this infrastructure were to disappear however, the user could still reproduce everything locally thanks to Nix.
- Easy to run
- Users can install and run AI executable code from the nixified.ai repository using a single `nix` command, on any distribution of Linux, and even Windows by using the Nix package manager.
- Support for NVIDIA and AMD GPUs
- Works with Windows Subsystem for Linux
- nixified.ai provides support for running AI executable code on the Windows Subsystem for Linux (WSL), a compatibility layer for running Linux applications on Windows. With the help of [NixOS-WSL](https://github.com/nix-community/NixOS-WSL), users can run GPU-accelerated AI workloads on WSL, providing a seamless experience for users who prefer to use Windows as their primary operating system.
---
# Packaged Projects
### KoboldAI
- [Official website](https://github.com/KoboldAI/KoboldAI-Client)
A browser-based front-end for AI-assisted writing with multiple local & remote AI models.
#### Get started
- `nix run github:nixified-ai/flake#koboldai-amd`
- `nix run github:nixified-ai/flake#koboldai-nvidia`
![](https://raw.githubusercontent.com/nixified-ai/flake/images/koboldai.webp)
---
### InvokeAI (A Stable Diffusion WebUI)
- [Official website](https://invoke-ai.github.io/InvokeAI/)
InvokeAI is an implementation of Stable Diffusion, the open source text-to-image and image-to-image generator. It provides a streamlined process with various new features and options to aid the image generation process.
#### Get started
- `nix run github:nixified-ai/flake#invokeai-amd`
- `nix run github:nixified-ai/flake#invokeai-nvidia`
![](https://raw.githubusercontent.com/nixified-ai/flake/images/invokeai.webp)

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

36
website/src/styles.css Normal file
View file

@ -0,0 +1,36 @@
* {
color: #eeeeee;
font-family: sans-serif;
}
body {
background: radial-gradient(circle, #4362a0 0%, #000000 100%);
margin-left: 20%;
margin-right: 20%;
}
img {
max-width: 100%;
}
li code {
font-family: monospace;
font-size: 1.2em;
background-color: #111111;
border-radius: 0.3em;
padding: 0.2em;
}
li {
margin-bottom: 0.5em;
}
hr {
border-color: #7ebae4;
color: #7ebae4;
}
h2 {
text-align: center;
width: 100%;
}