Merge branch 'development_kristof10' of github.com:freeflowuniverse/herolib into development_kristof10

This commit is contained in:
2025-02-05 07:57:09 +03:00
2 changed files with 31 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.virt.docker
mut engine := docker.new(prefix: '', localonly: true)!
mut r := engine.recipe_new(name: 'dev_ubuntu', platform: .ubuntu)
r.add_from(image: 'ubuntu', tag: 'latest')!
r.add_package(name: 'git,curl')!
r.add_zinit()!
r.add_sshserver()!
r.add_run(cmd: 'curl -LsSf https://astral.sh/uv/install.sh | sh')!
r.add_env('PATH', '/root/.local/bin:\$PATH')!
r.add_run(cmd: 'uv python install 3.12')!
r.add_run(cmd: 'uv venv /opt/venv')!
r.add_env('VIRTUAL_ENV', '/opt/venv')!
r.add_env('PATH', '/opt/venv/bin:\$PATH')!
r.add_run(cmd: 'uv pip install open-webui')!
r.add_zinit_cmd(
exec: "bash -c 'VIRTUAL_ENV=/opt/venv DATA_DIR=~/.open-webui /root/.local/bin/uvx --python 3.12 open-webui serve'"
name: 'open-webui'
)!
r.add_run(cmd: 'apt-get clean')!
r.add_run(cmd: 'rm -rf /var/lib/apt/lists/*')!
r.build(true)!

View File

@@ -25,5 +25,5 @@ pub fn (mut i EnvItem) check() ! {
}
pub fn (mut i EnvItem) render() !string {
return "ENV ${i.name}='${i.value}'"
return 'ENV ${i.name}="${i.value}"'
}