e95ee9c938
Made-with: Cursor
106 lines
2.8 KiB
YAML
106 lines
2.8 KiB
YAML
- name: Create Open WebUI data directory
|
|
file:
|
|
path: "{{ courseware_state_dir }}/open-webui"
|
|
state: directory
|
|
mode: "0755"
|
|
|
|
- name: Check Open WebUI virtual environment Python version
|
|
command:
|
|
argv:
|
|
- "{{ courseware_venvs_dir }}/open-webui/bin/python"
|
|
- -c
|
|
- "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
|
|
register: courseware_open_webui_venv_python_version
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Remove Open WebUI virtual environment with incompatible Python
|
|
file:
|
|
path: "{{ courseware_venvs_dir }}/open-webui"
|
|
state: absent
|
|
when:
|
|
- courseware_open_webui_venv_python_version.rc == 0
|
|
- courseware_open_webui_venv_python_version.stdout != courseware_python_runtime_version
|
|
|
|
- name: Create Open WebUI virtual environment
|
|
command:
|
|
argv:
|
|
- "{{ courseware_python_bin }}"
|
|
- -m
|
|
- venv
|
|
- "{{ courseware_venvs_dir }}/open-webui"
|
|
args:
|
|
creates: "{{ courseware_venvs_dir }}/open-webui/bin/python"
|
|
|
|
- name: Upgrade Open WebUI venv tooling
|
|
command:
|
|
argv:
|
|
- "{{ courseware_venvs_dir }}/open-webui/bin/python"
|
|
- -m
|
|
- pip
|
|
- install
|
|
- --upgrade
|
|
- pip
|
|
- setuptools
|
|
- wheel
|
|
|
|
- name: Install Open WebUI
|
|
command:
|
|
argv:
|
|
- "{{ courseware_venvs_dir }}/open-webui/bin/python"
|
|
- -m
|
|
- pip
|
|
- install
|
|
- "{{ courseware_open_webui_spec }}"
|
|
- "numpy<2"
|
|
|
|
- name: Check Embedding Atlas virtual environment Python version
|
|
command:
|
|
argv:
|
|
- "{{ courseware_venvs_dir }}/embedding-atlas/bin/python"
|
|
- -c
|
|
- "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
|
|
register: courseware_embedding_atlas_venv_python_version
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Remove Embedding Atlas virtual environment with incompatible Python
|
|
file:
|
|
path: "{{ courseware_venvs_dir }}/embedding-atlas"
|
|
state: absent
|
|
when:
|
|
- courseware_embedding_atlas_venv_python_version.rc == 0
|
|
- courseware_embedding_atlas_venv_python_version.stdout != courseware_python_runtime_version
|
|
|
|
- name: Create Embedding Atlas virtual environment
|
|
command:
|
|
argv:
|
|
- "{{ courseware_python_bin }}"
|
|
- -m
|
|
- venv
|
|
- "{{ courseware_venvs_dir }}/embedding-atlas"
|
|
args:
|
|
creates: "{{ courseware_venvs_dir }}/embedding-atlas/bin/python"
|
|
|
|
- name: Upgrade Embedding Atlas venv tooling
|
|
command:
|
|
argv:
|
|
- "{{ courseware_venvs_dir }}/embedding-atlas/bin/python"
|
|
- -m
|
|
- pip
|
|
- install
|
|
- --upgrade
|
|
- pip
|
|
- setuptools
|
|
- wheel
|
|
|
|
- name: Install Embedding Atlas
|
|
command:
|
|
argv:
|
|
- "{{ courseware_venvs_dir }}/embedding-atlas/bin/python"
|
|
- -m
|
|
- pip
|
|
- install
|
|
- "{{ courseware_embedding_atlas_spec }}"
|
|
- "numpy<2"
|