mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-24 12:24:24 +00:00
feat(evidently): dump collected notes
This commit is contained in:
76
examples/cloud-init/evidently-ui.s3.yml
Normal file
76
examples/cloud-init/evidently-ui.s3.yml
Normal file
@@ -0,0 +1,76 @@
|
||||
#cloud-config
|
||||
|
||||
# Tested on:
|
||||
# - Amazon Linux 2023
|
||||
|
||||
bootcmd:
|
||||
# `cloud-init` has issues with `firewall-cmd`, using the offline version.
|
||||
- firewall-offline-cmd --add-port='8000/tcp' --zone='public'
|
||||
|
||||
users:
|
||||
- default
|
||||
- evidently
|
||||
|
||||
packages:
|
||||
- make
|
||||
|
||||
write_files:
|
||||
- path: /home/evidently/requirements.txt
|
||||
owner: evidently:evidently
|
||||
defer: true
|
||||
content: |
|
||||
evidently[llm]==0.4.37
|
||||
tracely==0.1.0
|
||||
s3fs==2024.9.0
|
||||
- path: /home/evidently/Makefile
|
||||
owner: evidently:evidently
|
||||
defer: true
|
||||
content:
|
||||
# make sure to keep the tab characters in the targets' definitions
|
||||
|
|
||||
#!/usr/bin/env make
|
||||
|
||||
override venv ?= ${HOME}/venv
|
||||
|
||||
create-venv: override python_version ?= 3.9
|
||||
create-venv: python_executable = ${shell which --tty-only --show-dot --show-tilde 'python${python_version}'}
|
||||
create-venv: ${python_executable}
|
||||
@${python_executable} -m 'venv' '${venv}'
|
||||
@${venv}/bin/pip --require-virtualenv install -r 'requirements.txt'
|
||||
|
||||
recreate-venv:
|
||||
@rm -rf '${venv}'
|
||||
@${MAKE} create-venv
|
||||
|
||||
start-evidently-ui: override host ?= 0.0.0.0
|
||||
start-evidently-ui: override port ?= 8000
|
||||
start-evidently-ui: override workspace ?= s3://evidently-ui/workspace
|
||||
start-evidently-ui: create-venv ${venv}/bin/evidently
|
||||
@${venv}/bin/evidently ui --host='${host}' --port='${port}' --workspace='${workspace}'
|
||||
- path: /etc/systemd/system/evidently-ui.service
|
||||
owner: root:root
|
||||
permissions: 0755
|
||||
defer: true
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Evidently UI
|
||||
Documentation=https://docs.evidentlyai.com/
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
SyslogIdentifier=evidently-ui
|
||||
Type=simple
|
||||
User=evidently
|
||||
Group=evidently
|
||||
WorkingDirectory=/home/evidently
|
||||
ExecStart=/usr/bin/env make start-evidently-ui
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
runcmd:
|
||||
- systemctl reload 'firewalld.service'
|
||||
- systemctl daemon-reload
|
||||
- systemctl enable --now 'evidently-ui.service'
|
||||
Reference in New Issue
Block a user