Compare commits
34 Commits
d1b805789b
...
6cdaf9b06e
Author | SHA1 | Date | |
---|---|---|---|
6cdaf9b06e
|
|||
c626e942cd
|
|||
643d6819ee
|
|||
beb2df97be
|
|||
6158a033bb
|
|||
6cd5475490
|
|||
bc69781b25
|
|||
f4fa942b50
|
|||
0850fcf0a0
|
|||
1121e2d602
|
|||
964b75c6ae
|
|||
214468f832
|
|||
50bfb371d3
|
|||
8357e744ec
|
|||
57943b2fbc
|
|||
f2de0d024b
|
|||
8189e9b514
|
|||
22232f7a84
|
|||
130197eeb8
|
|||
46383d5e75
|
|||
fd867ed529
|
|||
eb1f5a0a43
|
|||
4ef00d2af9
|
|||
2da1857e27
|
|||
030bc52ec2
|
|||
fd27151122
|
|||
f09457f6fc
|
|||
adb2cbc4ca
|
|||
4fe17e1ec0
|
|||
dd637cb1ae
|
|||
cbc31f1083
|
|||
d00df9171b
|
|||
37a115b68e
|
|||
e78d3bb9d2
|
@@ -9,7 +9,6 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./gitea-runner.nix
|
./gitea-runner.nix
|
||||||
./nix-serve.nix
|
./nix-serve.nix
|
||||||
./zonos-container.nix
|
|
||||||
../desktop.nix
|
../desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -1,72 +0,0 @@
|
|||||||
# Auto-generated using compose2nix v0.3.2-pre.
|
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
hardware.nvidia-container-toolkit.enable = true;
|
|
||||||
# Runtime
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
# enableNvidia = true;
|
|
||||||
enableOnBoot = true;
|
|
||||||
autoPrune.enable = true;
|
|
||||||
daemon.settings.features.cdi = true;
|
|
||||||
rootless.enable = true;
|
|
||||||
rootless.daemon.settings.features.cdi = true;
|
|
||||||
};
|
|
||||||
virtualisation.oci-containers.backend = "docker";
|
|
||||||
|
|
||||||
# Containers
|
|
||||||
virtualisation.oci-containers.containers."zonos_container" = {
|
|
||||||
image = "compose2nix/zonos_container";
|
|
||||||
environment = {
|
|
||||||
"GRADIO_SHARE" = "False";
|
|
||||||
"NVIDIA_VISIBLE_DEVICES" = "0";
|
|
||||||
};
|
|
||||||
cmd = [
|
|
||||||
"python3"
|
|
||||||
"gradio_interface.py"
|
|
||||||
];
|
|
||||||
log-driver = "journald";
|
|
||||||
extraOptions = [
|
|
||||||
"--device=nvidia.com/gpu=0"
|
|
||||||
"--network=host"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
systemd.services."docker-zonos_container" = {
|
|
||||||
serviceConfig = {
|
|
||||||
Restart = lib.mkOverride 90 "no";
|
|
||||||
};
|
|
||||||
partOf = [
|
|
||||||
"docker-compose-zonos-root.target"
|
|
||||||
];
|
|
||||||
wantedBy = [
|
|
||||||
"docker-compose-zonos-root.target"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Builds
|
|
||||||
systemd.services."docker-build-zonos_container" = {
|
|
||||||
path = [
|
|
||||||
pkgs.docker
|
|
||||||
pkgs.git
|
|
||||||
];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
TimeoutSec = 900;
|
|
||||||
};
|
|
||||||
script = ''
|
|
||||||
cd /home/jordan/projects/jordan/Zonos
|
|
||||||
docker build -t compose2nix/zonos_container .
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Root service
|
|
||||||
# When started, this will automatically create all resources and start
|
|
||||||
# the containers. When stopped, this will teardown all resources.
|
|
||||||
systemd.targets."docker-compose-zonos-root" = {
|
|
||||||
unitConfig = {
|
|
||||||
Description = "Root target generated by compose2nix.";
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
}
|
|
Reference in New Issue
Block a user