-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (38 loc) · 1.25 KB
/
ray_checks.yml
File metadata and controls
39 lines (38 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: ray checks
on:
push:
branches:
- main
pull_request:
paths:
- "ray/**"
- ".github/workflows/ray_checks.yml"
jobs:
ray-checks:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare environment
run: |
./bin/setup-folders.sh
./bin/setup-envs.sh --project_name action-runner --port_prefix 131
sed -i 's/\(DATS_RAY_DOCKER_VERSION=[0-9.]*\)/\1-${{ github.run_id }}/' docker/.env
sed -i 's/^RAY_DEVICE_IDS=.*/RAY_DEVICE_IDS=1/' docker/.env
echo "RAY_CACHE_DIR=$HOME/ray_cache" >> docker/.env
mkdir -p $HOME/ray_cache
chmod 777 $HOME/ray_cache
sed -i 's/ray_network/ray_network_${{ github.run_id }}/g' docker/compose.ray.yml
- name: Build & Start Docker Containers
working-directory: docker
run: |
source .env
docker compose -f compose.ray.yml build
docker compose -f compose.ray.yml up --wait
- name: Cleanup
working-directory: docker
if: always()
run: |
docker compose -f compose.ray.yml down -v
RAY_IMAGE=uhhlt/dats_ray:$(grep -oP 'DATS_RAY_DOCKER_VERSION=\K.*' .env)
docker rmi $RAY_IMAGE