X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/8f4255af6d104114c2897c69b378e6984072805c..49339bbae3ecf82155633f4d95274adf94afdcdc:/invoke/setup-linux/tasks.py diff --git a/invoke/setup-linux/tasks.py b/invoke/setup-linux/tasks.py index 093462b..fabd7eb 100644 --- a/invoke/setup-linux/tasks.py +++ b/invoke/setup-linux/tasks.py @@ -87,6 +87,10 @@ def vim_markdown(c): 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 add_vim_plugin(c, git_path, folder): c.run(f'mkdir -p {HOME}/.vim/pack/') @@ -96,3 +100,30 @@ 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") +@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') +