Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

website: init #4

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 190 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 9 additions & 0 deletions website/default.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 30 additions & 0 deletions website/package.nix
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions website/src/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nixified.ai
1 change: 1 addition & 0 deletions website/src/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="icon" type="image/png" href="./nixified-ai-icon.png">
63 changes: 63 additions & 0 deletions website/src/index.md
Original file line number Diff line number Diff line change
@@ -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 added website/src/nixified-ai-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions website/src/styles.css
Original file line number Diff line number Diff line change
@@ -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%;
}