I have a python code that uses ray. It works locally on my mac, but once I try to run it inside a local docker container I get the following:
A warning:
WARNING services.py:1922 -- WARNING: The object store is using /tmp instead of /dev/shm
because /dev/shm has only 67108864 bytes available. This will harm performance! You may
be able to free up space by deleting files in /dev/shm. If you are inside a Docker
container, you can increase /dev/shm size by passing '--shm-size=2.39gb' to 'docker run'
(or add it to the run_options list in a Ray cluster config). Make sure to set this to
more than 30% of available RAM.
after the warning it says: INFO worker.py:1528 -- Started a local Ray instance.
and a few seconds later I get this error:
core_worker.cc:179: Failed to register worker
01000000ffffffffffffffffffffffffffffffffffffffffffffffff to Raylet. IOError:
[RayletClient] Unable to register worker with raylet. No such file or directory
I already tried:
- increasing the /dev/shm as explained
- limit the number of cpus in the ray.init() command (as mentioned here)
- use ray.init(_plasma_directory = 'dev/shm/')
I use version 2.1.0 of ray.
The first line of my dockerfile: FROM --platform=linux/amd64 python:3.10.9-slim-bullseye
(without the --platform I can't pip install ray)
Any ideas what can I do to solve it? Thanks for you help