Skip to content

Commit 6c9413f

Browse files
committed
adding required role
1 parent 2c44f56 commit 6c9413f

9 files changed

Lines changed: 114 additions & 1 deletion

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010
.vault-password.*
1111

1212
# installed roles
13-
roles
13+
roles/*
14+
15+
# this is ours
16+
!roles/usegalaxy_cz.llm_hub
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Role Name
2+
=========
3+
4+
Configure support for LLM Hub tool
5+
6+
Requirements
7+
------------
8+
9+
Role Variables
10+
--------------
11+
12+
Dependencies
13+
------------
14+
15+
Example Playbook
16+
----------------
17+
18+
19+
License
20+
-------
21+
22+
BSD
23+
24+
Author Information
25+
------------------
26+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#SPDX-License-Identifier: MIT-0
2+
---
3+
# defaults file for usegalaxy_cz.llm_hub
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#SPDX-License-Identifier: MIT-0
2+
---
3+
# handlers file for usegalaxy_cz.llm_hub
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#SPDX-License-Identifier: MIT-0
2+
galaxy_info:
3+
author: your name
4+
description: your role description
5+
company: your company (optional)
6+
7+
# If the issue tracker for your role is not on github, uncomment the
8+
# next line and provide a value
9+
# issue_tracker_url: http://example.com/issue/tracker
10+
11+
# Choose a valid license ID from https://spdx.org - some suggested licenses:
12+
# - BSD-3-Clause (default)
13+
# - MIT
14+
# - GPL-2.0-or-later
15+
# - GPL-3.0-only
16+
# - Apache-2.0
17+
# - CC-BY-4.0
18+
license: license (GPL-2.0-or-later, MIT, etc)
19+
20+
min_ansible_version: 2.1
21+
22+
# If this a Container Enabled role, provide the minimum Ansible Container version.
23+
# min_ansible_container_version:
24+
25+
galaxy_tags: []
26+
# List tags for your role here, one per line. A tag is a keyword that describes
27+
# and categorizes the role. Users find roles by searching for tags. Be sure to
28+
# remove the '[]' above, if you add tags to this list.
29+
#
30+
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
31+
# Maximum 20 tags per role.
32+
33+
dependencies: []
34+
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
35+
# if you add dependencies to this list.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
- name: Retrieve current list of LLMs
4+
delegate_to: localhost
5+
shell: |
6+
echo '#<model_id> <display_name> <domain> <provider> <free_tag>' >files/{{ inventory_hostname }}/llm_models.loc && \
7+
curl -H "Authorization: Bearer {{ llm_hub.token }}" {{ llm_hub.endpoint }}/models | \
8+
jq -r --arg re "^({{ multimodals | join('|') }})" \
9+
'.data[].id | if test($re) then [.,.,"multimodal","CERIT-SC","tag"] else [.,.,"text","CERIT-SC","tag"] end | @tsv' \
10+
>> files/{{ inventory_hostname }}/llm_models.loc
11+
become: false
12+
13+
- name: Install the list of LLMs
14+
copy:
15+
src: files/{{ inventory_hostname }}/llm_models.loc
16+
dest: "{{ galaxy_tool_data_path }}/llm_models.loc"
17+
18+
- name: Install specific local dependencies
19+
pip:
20+
name: openai
21+
virtualenv: "{{ galaxy_venv_dir }}"
22+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#SPDX-License-Identifier: MIT-0
2+
localhost
3+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#SPDX-License-Identifier: MIT-0
2+
---
3+
- hosts: localhost
4+
remote_user: root
5+
roles:
6+
- usegalaxy_cz.llm_hub
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#SPDX-License-Identifier: MIT-0
2+
---
3+
# vars file for usegalaxy_cz.llm_hub
4+
5+
multimodals:
6+
- llama
7+
- qwen
8+
- nomic
9+
- kimi
10+
- mistral
11+
- deepseek
12+
- glm

0 commit comments

Comments
 (0)