github actions and docker compose
update update run update adding steps working as root run update update Add ARM Dockerfile Temporarily require peft<0.5.0, transformers<4.32.0 (#470) Peft 0.5 recently released and broke some compatilibities. This PR temporarily requires petals to use the previous stable version of peft while we work on 0.5.0 support. run update adding steps working as root petals inference moving to my org first docker compose move to our org format adding hive mind back into the setup reformat ipynb now to test main version using cpu now working. The health server now needs to wait for the others to come up but otherwise it is working. adding chat health adding new test run update Update run-tests-docker.yaml tpu starting running locally in cpu mode, now we have the basic directory structure for an env, still need to tag the items properly. versionspull/567/head
parent
0fda7da816
commit
1222e172ef
@ -0,0 +1,36 @@
|
||||
name: Tests in docker compose
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
run-tests-in-compose:
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Increase swap space
|
||||
if: ${{ matrix.os == 'ubuntu' }}
|
||||
uses: meta-introspector/set-swap-space@main
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
- name: Checkout
|
||||
uses: meta-introspector/checkout@main
|
||||
|
||||
- name: Build the docker-compose stack
|
||||
run: docker-compose -f docker-compose.yml up -d
|
||||
|
||||
- name: Check running containers
|
||||
run: docker ps -a
|
||||
|
||||
- name: Check logs
|
||||
run: docker logs health
|
||||
|
||||
- name: Build the docker-compose stack
|
||||
run: docker-compose down
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,111 @@
|
||||
#version: "3"
|
||||
|
||||
services:
|
||||
|
||||
health:
|
||||
restart: always
|
||||
depends_on:
|
||||
- backbone
|
||||
image: h4ckermike/health.petals:main
|
||||
ports:
|
||||
- "8100:5000"
|
||||
env_file: health.env
|
||||
command: flask run --host=0.0.0.0 --port=5000
|
||||
|
||||
inference :
|
||||
restart: always
|
||||
depends_on:
|
||||
- backbone
|
||||
image: h4ckermike/inference.petals:main
|
||||
ports:
|
||||
- "8000:5000"
|
||||
env_file: health.env
|
||||
command: gunicorn app:app --bind 0.0.0.0:5000 --worker-class gthread --threads 100 --timeout 1000
|
||||
|
||||
tinyllamacpu:
|
||||
image: h4ckermike/petals:main
|
||||
depends_on:
|
||||
- backbone
|
||||
command: python -m petals.cli.run_server --port 31331 --num_blocks=1 Maykeye/TinyLLama-v0 --initial_peers $INITIAL_PEERS --device=$DEVICE
|
||||
ports:
|
||||
- "31331:31331"
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
restart: always
|
||||
|
||||
tinyllamagpu:
|
||||
image: h4ckermike/petals:main
|
||||
depends_on:
|
||||
- backbone
|
||||
ports:
|
||||
- "31332:31332"
|
||||
command: python -m petals.cli.run_server --port 31332 --num_blocks=1 Maykeye/TinyLLama-v0 --initial_peers $INITIAL_PEERS --device=$DEVICE
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
restart: always
|
||||
|
||||
tinyllamatpu:
|
||||
image: h4ckermike/petals:main
|
||||
depends_on:
|
||||
- backbone
|
||||
ports:
|
||||
- "31333:31333"
|
||||
command: python -m petals.cli.run_server --port 31333 --num_blocks=1 Maykeye/TinyLLama-v0 --initial_peers $INITIAL_PEERS --device=$DEVICE
|
||||
|
||||
# deploy:
|
||||
# resources:
|
||||
# reservations:
|
||||
# devices:
|
||||
# - driver: nvidia
|
||||
# count: 1
|
||||
# capabilities: [gpu]
|
||||
restart: always
|
||||
|
||||
# beluga:
|
||||
# image: h4ckermike/petals:main
|
||||
# depends_on:
|
||||
# - backbone
|
||||
# deploy:
|
||||
# resources:
|
||||
# reservations:
|
||||
# devices:
|
||||
# - driver: nvidia
|
||||
# count: 1
|
||||
# capabilities: [gpu]
|
||||
# ports:
|
||||
# - "31330:31330"
|
||||
# restart: always
|
||||
|
||||
backbone:
|
||||
image: h4ckermike/petals:main
|
||||
command: python -m petals.cli.run_dht --host_maddrs /ip4/0.0.0.0/tcp/8099 --identity_path /cache/bootstrap1.id
|
||||
volumes:
|
||||
- petals-cache-backbone:/cache
|
||||
network_mode: host
|
||||
ipc: host
|
||||
restart: unless-stopped
|
||||
env_file: health.env
|
||||
|
||||
# # DEbug target
|
||||
# debug_health:
|
||||
# #environment:
|
||||
|
||||
# env_file: health.env
|
||||
# image: h4ckermike/health.petals:main
|
||||
# command: bash
|
||||
# stdin_open: true
|
||||
# tty: true
|
||||
|
||||
|
||||
volumes:
|
||||
petals-cache-backbone:
|
@ -0,0 +1,2 @@
|
||||
INITIAL_PEERS=/ip4/172.17.0.1/tcp/8099/p2p/QmfVvYv3w3EqpKGYG5FCcER9bFgoGLCUvXDUJsZAgSDw3N
|
||||
DEVICE=cpu
|
@ -0,0 +1,5 @@
|
||||
INITIAL_PEERS=/ip4/172.17.0.1/tcp/8099/p2p/QmfVvYv3w3EqpKGYG5FCcER9bFgoGLCUvXDUJsZAgSDw3N
|
||||
#PJRT_DEVICE=TPU
|
||||
DEVICE=cuda
|
||||
#DEVICE=cpu
|
||||
#DEVICE=tpux
|
@ -0,0 +1,4 @@
|
||||
INITIAL_PEERS=/ip4/10.164.0.22/tcp/8099/p2p/QmRVmvteSpVKKeNDSaV7Ezy3HNA4bnNfE2EbzDJVFDEwAa
|
||||
#PJRT_DEVICE=TPU
|
||||
#DEVICE=xla
|
||||
DEVICE=cpu
|
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Petals Inference
|
||||
|
||||
[Service]
|
||||
User=petals
|
||||
Group=petals
|
||||
Environment=PJRT_DEVICE=TPU
|
||||
ExecStart=/home/petals/venv/bin/python -m petals.cli.run_server --port 31330 petals-team/StableBeluga2 --device xla --num_blocks=4
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1 @@
|
||||
docker logs petals-backbone-1 2>&1 |grep initial_peers |cut "-d " -f18- | sort -u > peers.txt
|
@ -0,0 +1,3 @@
|
||||
INITIAL_PEERS=/ip4/10.164.0.22/tcp/8099/p2p/QmRVmvteSpVKKeNDSaV7Ezy3HNA4bnNfE2EbzDJVFDEwAa
|
||||
PJRT_DEVICE=TPU
|
||||
DEVICE=xla
|
@ -0,0 +1 @@
|
||||
PJRT_DEVICE=TPU python -m petals.cli.run_server --port 31330 petals-team/StableBeluga2 --device xla --num_blocks=10
|
@ -0,0 +1 @@
|
||||
docker run -d --net host --ipc host --volume petals-cache-backbone:/cache --name backbone --rm learningathome/petals:main python -m petals.cli.run_dht --host_maddrs /ip4/0.0.0.0/tcp/8099 --identity_path bootstrap1.id
|
Loading…
Reference in New Issue