Open devinrsmith opened 1 year ago
Trying to solve it at the filesystem level by removing the write bit from
chmod -w /opt/deephaven/venv/lib/python3.10/site-packages/deephaven/__init__.py
doesn't work b/c the docker image is currently running as root; this would likely work if we had a different user running inside the image.
Another alternative would be chattr +i
, which can still be worked around by root, but is an explicit operation:
$ docker run --cap-add CAP_LINUX_IMMUTABLE -it --rm --name deephaven -p 10000:10000 --entrypoint bash ghcr.io/deephaven/server:0.28.0
root@71cff31ed482:/# chattr +i /opt/deephaven/venv/lib/python3.10/site-packages/deephaven/__init__.py
root@71cff31ed482:/# pip install deephaven-core==0.28.1
...
Installing collected packages: deephaven-core
Attempting uninstall: deephaven-core
Found existing installation: deephaven-core 0.28.0
Uninstalling deephaven-core-0.28.0:
ERROR: Could not install packages due to an OSError: [Errno 1] Operation not permitted: '/opt/deephaven/venv/lib/python3.10/site-packages/deephaven/__init__.py'
Unfortunately, I've been unable to figure out how / if it's possible to give these privileges at docker build time; currently running into:
> [2/3] RUN chattr +i "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven/__init__.py":
0.072 chattr: Operation not permitted while setting flags on /opt/deephaven/venv/lib/python3.10/site-packages/deephaven/__init__.py
A user on slack reported an error starting up a deephaven docker server:
I suspect this is due to a python plugin being installed that forced a newer version of deephaven-core to be installed; namely,
deephaven-plugin-matplotlib
is declaring a dependency ondeephaven-core>=0.27.0
(due to recent plugin interface changes), but the underlying image was < 0.27.0.We should see if there is a way to lock the version of deephaven-core in the python virtual environment; alternatively, maybe we set that part of the filesystem as read-only?