Support LAN deployment and managed Python runtime
Made-with: Cursor
This commit is contained in:
@@ -4,6 +4,24 @@
|
||||
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:
|
||||
@@ -36,6 +54,24 @@
|
||||
- "{{ 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:
|
||||
|
||||
Reference in New Issue
Block a user