]> apps.delaporte.us Git - dotfiles.git/blobdiff - invoke/setup-linux/tasks.py
Add lama-cpp ui runner
[dotfiles.git] / invoke / setup-linux / tasks.py
index 093462b8e62020c25ffda87a62bf1ee8baca7512..7303939867bf573c6ac7d0c0774260e54d589012 100644 (file)
@@ -87,6 +87,16 @@ def vim_markdown(c):
 def vim_airline(c):
     add_vim_plugin(c, 'https://github.com/vim-airline/vim-airline.git', 'airline')
 
 def vim_airline(c):
     add_vim_plugin(c, 'https://github.com/vim-airline/vim-airline.git', 'airline')
 
+@task
+def vim_ollama(c):
+    add_vim_plugin(c, 'https://github.com/gergap/vim-ollama.git', 'vim-ollama')
+
+@task 
+def vim_all(c):
+    vim_airline(c)
+    vim_markdown(c)
+    vim_nerdtree(c)
+
 @task
 def add_vim_plugin(c, git_path, folder):
     c.run(f'mkdir -p {HOME}/.vim/pack/')
 @task
 def add_vim_plugin(c, git_path, folder):
     c.run(f'mkdir -p {HOME}/.vim/pack/')
@@ -96,3 +106,46 @@ def add_vim_plugin(c, git_path, folder):
     c.run(f'ls -l {HOME}/.vim/pack/vendor/opt')
     print(f"Use `packadd {folder}` in .vimrc to enable")
 
     c.run(f'ls -l {HOME}/.vim/pack/vendor/opt')
     print(f"Use `packadd {folder}` in .vimrc to enable")
 
+@task
+def ensure_env(c, env):
+    envs = f'{HOME}/envs'
+    path = f'{envs}/{env}'
+    if(not os.path.exists(envs)):
+        c.run(f'mkdir -p {envs}')
+
+    if(not os.path.exists(path)):
+       c.run(f'python3 -m venv {path}')
+       reqs = f'{DOTFILES}/reqs/{env}.txt'
+       c.run(f'{path}/bin/pip install -r {reqs}')
+
+    c.run(f'{path}/bin/pip freeze')
+
+@task
+def env_borg(c):
+    ensure_env(c, 'borg')
+
+@task
+def env_ansible(c):
+    ensure_env(c, 'ansible')
+
+
+@task
+def env_jupyter(c):
+    ensure_env(c, 'jupyter')
+
+@task
+def clone(c, path):
+    c.run(f'mkdir -p {HOME}/src')
+    c.run(f'cd {HOME}/src; git clone {path}')
+
+@task
+def clone_minion(c):
+    clone(c, 'ssh://git@codeberg.org/EdTheDev/minion.git')
+
+@task
+def clone_favs(c):
+    clone(c, 'ssh://git@codeberg.org/EdTheDev/down-shift.git')
+    clone(c, 'ssh://git@codeberg.org/EdTheDev/todolist.git')
+    clone(c, 'ssh://git@codeberg.org/EdTheDev/weekend-template.git')
+    clone(c, 'ssh://git@codeberg.org/EdTheDev/invoke-tui.git')
+