mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
14fa08e2e7
* add query_incomplete_rankings() * Add SQL queries for TreeManager task selection * first working version of TreeManager.next_task() * remove old generate_task(), add mandatory_labels to text_labels task * Add ConversationMessage list to Ranking tasks * add more sophisticated sql queries to find extendible trees * add TreeManager.query_extendible_parents() * fix task validation, seed data insertion (reviewed) * provide user for task selection in text-frontend * enter 'growing' state * enter 'aborted_low_grade' state * enter 'ranking' state * check tree 'growing' state upon relpy insertion * exclude user from labeling their own messages (added DEBUG_ALLOW_SELF_LABELING setting) * add DEBUG_ALLOW_SELF_LABELING to docker-compose.yaml * fix ranking submission * add query_tree_ranking_results() * add ranked_message_ids to RankingReactionPayload * fix reply_messages instead of prompt_messages * incorment 'ranking_count' of ranked replies * added logic to check_condition_for_scoring_state * changes to msg_tree_state_machine * pre-commit changes * enter 'ready_for_scoring' state * re-add HF embedding call (lost during merge) * use prepare_conversation() helper for seed-data creation * Partially add user specified task selection Co-authored-by: Daniel Hug <danielpatrickhug@gmail.com>
123 lines
3.9 KiB
YAML
123 lines
3.9 KiB
YAML
# ansible playbook to set up some docker containers
|
|
|
|
- name: Set up a dev node
|
|
hosts: dev
|
|
gather_facts: true
|
|
tasks:
|
|
- name: Create network
|
|
community.docker.docker_network:
|
|
name: oasst
|
|
state: present
|
|
driver: bridge
|
|
|
|
- name: Copy redis.conf to managed node
|
|
ansible.builtin.copy:
|
|
src: ./redis.conf
|
|
dest: ./redis.conf
|
|
|
|
- name: Set up Redis
|
|
community.docker.docker_container:
|
|
name: oasst-redis
|
|
image: redis
|
|
state: started
|
|
restart_policy: always
|
|
network_mode: oasst
|
|
ports:
|
|
- 6379:6379
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
interval: 2s
|
|
timeout: 2s
|
|
retries: 10
|
|
command: redis-server /usr/local/etc/redis/redis.conf
|
|
volumes:
|
|
- "./redis.conf:/usr/local/etc/redis/redis.conf"
|
|
|
|
- name: Set up Redis Insights
|
|
community.docker.docker_container:
|
|
name: oasst-redis-insights
|
|
image: redislabs/redisinsight:latest
|
|
state: started
|
|
restart_policy: always
|
|
network_mode: oasst
|
|
ports:
|
|
- 8001:8001
|
|
|
|
- name: Create postgres containers
|
|
community.docker.docker_container:
|
|
name: "{{ item.name }}"
|
|
image: postgres:15
|
|
state: started
|
|
restart_policy: always
|
|
network_mode: oasst
|
|
env:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
volumes:
|
|
- "{{ item.name }}:/var/lib/postgresql/data"
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
|
interval: 2s
|
|
timeout: 2s
|
|
retries: 10
|
|
loop:
|
|
- name: oasst-postgres
|
|
- name: oasst-postgres-web
|
|
|
|
- name: Run the oasst oasst-backend
|
|
community.docker.docker_container:
|
|
name: oasst-backend
|
|
image: ghcr.io/laion-ai/open-assistant/oasst-backend
|
|
state: started
|
|
recreate: true
|
|
pull: true
|
|
restart_policy: always
|
|
network_mode: oasst
|
|
env:
|
|
POSTGRES_HOST: oasst-postgres
|
|
REDIS_HOST: oasst-redis
|
|
DEBUG_ALLOW_ANY_API_KEY: "true"
|
|
DEBUG_USE_SEED_DATA: "true"
|
|
DEBUG_ALLOW_SELF_LABELING: "true"
|
|
MAX_WORKERS: "1"
|
|
RATE_LIMIT: "false"
|
|
DEBUG_SKIP_EMBEDDING_COMPUTATION: "true"
|
|
ports:
|
|
- 8080:8080
|
|
|
|
- name: Run the oasst oasst-web frontend
|
|
community.docker.docker_container:
|
|
name: oasst-web
|
|
image: ghcr.io/laion-ai/open-assistant/oasst-web
|
|
state: started
|
|
recreate: true
|
|
pull: true
|
|
restart_policy: always
|
|
network_mode: oasst
|
|
env:
|
|
ADMIN_USERS: "{{ lookup('ansible.builtin.env', 'WEB_ADMIN_USERS') }}"
|
|
DATABASE_URL: postgres://postgres:postgres@oasst-postgres-web/postgres
|
|
DEBUG_LOGIN: "true"
|
|
DISCORD_CLIENT_ID:
|
|
"{{ lookup('ansible.builtin.env', 'WEB_DISCORD_CLIENT_ID') }}"
|
|
DISCORD_CLIENT_SECRET:
|
|
"{{ lookup('ansible.builtin.env', 'WEB_DISCORD_CLIENT_SECRET') }}"
|
|
EMAIL_FROM: open-assistent@laion.ai
|
|
EMAIL_SERVER_HOST:
|
|
"{{ lookup('ansible.builtin.env', 'WEB_EMAIL_SERVER_HOST') }}"
|
|
EMAIL_SERVER_PASSWORD:
|
|
"{{ lookup('ansible.builtin.env', 'WEB_EMAIL_SERVER_PASSWORD') }}"
|
|
EMAIL_SERVER_PORT:
|
|
"{{ lookup('ansible.builtin.env', 'WEB_EMAIL_SERVER_PORT') }}"
|
|
EMAIL_SERVER_USER:
|
|
"{{ lookup('ansible.builtin.env', 'WEB_EMAIL_SERVER_USER') }}"
|
|
FASTAPI_URL: http://oasst-backend:8080
|
|
FASTAPI_KEY: "1234"
|
|
NEXTAUTH_SECRET:
|
|
"{{ lookup('ansible.builtin.env', 'WEB_NEXTAUTH_SECRET') }}"
|
|
NEXTAUTH_URL: http://web.dev.open-assistant.io/
|
|
ports:
|
|
- 3000:3000
|
|
command: bash wait-for-postgres.sh node server.js
|