Error on Seafile docker upgrade 13.0.15: core dump because of Numpy

Yes, the problem should be mentioned in the doc. If I remember well, the Seafile Team prefer we mention issues here than on GitHub, @daniel.pan can you look at this?

I found a workaround for now, by compiling numpy on my machine using pip.

Here are some (not very detailed) instructions on how to do it:

  1. modify the seafile-server.yml to add a new shared volume, like:
    /opt/seafile-pip:/shared2

  2. restart docker containers

  3. open a shell in the seafile container:
    $ docker exec -it seafile /bin/bash

  4. remove pre-compiled numpy and copy pip packages to the new shared volume:
    $ pip3 uninstall numpy
    $ cp -r /usr/local/lib/python3.12/dist-packages/* /shared2

  5. modify again the seafile-server.yml to make the shared volume replace the pip directory:
    /opt/seafile-pip: /usr/local/lib/python3.12/dist-packages/

  6. restart docker containers

  7. re-open a shell in the seafile container:
    $ docker exec -it seafile /bin/bash

  8. compile numpy for your computer (this can take a lot of time):
    $ pip install --no-binary numpy numpy -Csetup-args=-Dcpu-baseline=none

  9. restart docker

  10. test

One drawback is that you must update yourself all pip packages. Maybe this can be improved by just mounting the numpy directory instead of all pip modules…

I decided to use this workaround during the time to find a more recent CPU, because I think this problem will append more and more with time, not only with Seafile…