Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Oct 4, 2024
1 parent b335f39 commit b281a01
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ venv
*.so
*.log
results-sf*
*.tar
6 changes: 4 additions & 2 deletions k8s/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rayproject/ray:2.9.0
FROM rayproject/ray:2.37.0.cabc24-py312

RUN sudo apt update && \
sudo apt install -y curl build-essential
Expand Down Expand Up @@ -29,4 +29,6 @@ RUN source venv/bin/activate && \
source /home/ray/.cargo/env && \
maturin build --release

RUN pip3 install /home/ray/target/wheels/datafusion_ray-0.6.0-cp38-abi3-manylinux_2_31_x86_64.whl
FROM rayproject/ray:2.37.0.cabc24-py312
COPY --from=0 /home/ray/target/wheels/datafusion_ray-0.6.0-cp38-abi3-manylinux_2_35_x86_64.whl /home/ray/datafusion_ray-0.6.0-cp38-abi3-manylinux_2_35_x86_64.whl
RUN pip3 install /home/ray/datafusion_ray-0.6.0-cp38-abi3-manylinux_2_35_x86_64.whl
22 changes: 19 additions & 3 deletions k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,32 @@ Run the following command to build the Docker image.
docker build -t dfray -f k8s/Dockerfile .
```

Import the image into k3s
Either push the image to a repository that k3s can pull from (recommended), or copy the image directly into the nodes:

```shell
docker save dfray | k3s ctr images import -
docker save -o dfray.tar dfray
scp dfray.tar username@node1:
scp dfray.tar username@node2:
```

ssh into each node and run:

```shell
sudo k3s ctr images import dfray.tar
```

## Run the example

From the `examples` directory:

```shell
ray job submit --working-dir `pwd` --runtime-env ../k8s/runtime-env.yaml -- python3 tips.py
ray job submit --runtime-env-json='{"container": {"image": "dfray"}}' -- python3 tips.py
```

This fails with:

```text
'The 'container' field currently cannot be used together with other fields of runtime_env. Specified fields: dict_keys(['container', 'env_vars'])'
```

Possible fix: https://github.com/ray-project/ray/pull/42121
6 changes: 0 additions & 6 deletions k8s/runtime-env.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion requirements-in.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ mypy
numpy
pyarrow
pytest
ray==2.9.0
ray==2.37.0
toml
importlib_metadata; python_version < "3.8"

0 comments on commit b281a01

Please sign in to comment.