Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pip cache of session_latest #712

Merged
merged 12 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .devcontainer/docker-compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: lumigator

services:

ray:
volumes:
- /tmp/ray_pip_cache:/tmp/ray_pip_cache
backend:
build:
context: .
dockerfile: "Dockerfile"
target: "dev_image"
volumes:
- database_volume:/mzai/backend/local.db
- database_volume:/mzai/backend/local.db
ports:
- "5678:5678"
develop:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/lumigator_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ jobs:
mkdir -p ${HOME}/.cache/huggingface
chmod -R 777 ${HOME}/.cache/huggingface

- name: Create pip cache
run: |
mkdir -p /tmp/ray_pip_cache
chmod -R 777 /tmp/ray_pip_cache

- name: Spinning up containers for the tests
run: make start-lumigator-build

Expand Down Expand Up @@ -127,6 +132,11 @@ jobs:
mkdir -p ${HOME}/.cache/huggingface
chmod -R 777 ${HOME}/.cache/huggingface

- name: Create pip cache
run: |
mkdir -p /tmp/ray_pip_cache
chmod -R 777 /tmp/ray_pip_cache

- name: Setup containers
run: make start-lumigator-build

Expand Down
17 changes: 16 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,24 @@ services:
# RAY_JOB_ALLOW_DRIVER_ON_WORKER_NODES_ENV_VAR is set
# Dead head nodes appear because of the GCS data being
# persisted in Redis
command: bash -c "RAY_REDIS_ADDRESS=redis:6379 RAY_JOB_ALLOW_DRIVER_ON_WORKER_NODES_ENV_VAR=1 RAY_REDIS_ADDRESS=redis:6379 ray start --head --dashboard-port=8265 --port=6379 --dashboard-host=0.0.0.0 --ray-client-server-port 10001 --block" # pragma: allowlist secret
entrypoint:
- /bin/bash
- -c
- |
set -eaux
mkdir -p /tmp/ray_pip_cache
# If the file was mounted in a volume instead of
# a shared dir, permissions need to be setup
# ... || true allows this to fail (-e is set)
sudo chmod -R 777 /tmp/ray_pip_cache/ || true
RAY_JOB_ALLOW_DRIVER_ON_WORKER_NODES_ENV_VAR=1 RAY_REDIS_ADDRESS=redis:6379 ray start --head --dashboard-port=8265 --port=6379 --dashboard-host=0.0.0.0 --ray-client-server-port 10001
mkdir -p /tmp/ray/session_latest/runtime_resources/pip
javiermtorres marked this conversation as resolved.
Show resolved Hide resolved
rmdir /tmp/ray/session_latest/runtime_resources/pip/ && ln -s /tmp/ray_pip_cache /tmp/ray/session_latest/runtime_resources/pip
sleep infinity
shm_size: 2g
volumes:
- ${HOME}/.cache/huggingface:/home/ray/.cache/huggingface
- ray-pip-cache:/tmp/ray_pip_cache
deploy:
resources:
limits:
Expand Down Expand Up @@ -202,3 +216,4 @@ volumes:
minio-data:
database_volume:
redis-data:
ray-pip-cache: