czcorpus / kontext

An advanced, extensible web front-end for the Manatee-open corpus search engine
GNU General Public License v2.0
60 stars 22 forks source link

Installation on Ubuntu 22.04 LTS #5313

Closed mvignone closed 4 months ago

mvignone commented 2 years ago

Hi,

We're trying to install kontext on an Ubuntu based VM using installation instructions in README.md, but unsuccessfully.

If we try to use docker-compose, we get the following:

sudo docker-compose up Creating network "kontext_databases" with the default driver Creating network "kontext_kontext" with the default driver Creating volume "kontext_files" with default driver Creating volume "kontext_corpora-data" with default driver Creating volume "kontext_corpora-cache" with default driver Creating volume "kontext_redisdata" with default driver Pulling redis (redis:latest)... latest: Pulling from library/redis 31b3f1ad4ce1: Pull complete ff29a33e56fb: Pull complete b230e0fd0bf5: Pull complete 7fe3ad196642: Pull complete 3d8096d6920c: Pull complete 85e4b89053d8: Pull complete Digest: sha256:f1b85165ed261e9dc6594ea0edf25b05cfed7a806f5f75bb2d39cc5fdf2b9ff7 Status: Downloaded newer image for redis:latest Building rq-scheduler Sending build context to Docker daemon 47.26MB Step 1/3 : FROM python:3.8-slim 3.8-slim: Pulling from library/python 31b3f1ad4ce1: Already exists f335cc1597f2: Pull complete 2d22d27d2113: Pull complete 9913e6455486: Pull complete eede1fc00b8a: Pull complete Digest: sha256:1a462c474da04032bc2a4028fe4af05b53b613953c4097b1dd04e39b2da6900b Status: Downloaded newer image for python:3.8-slim ---> bbf676da2044 Step 2/3 : RUN pip3 install --upgrade pip && pip3 install rq-scheduler ---> Running in bd8b40a243bd Requirement already satisfied: pip in /usr/local/lib/python3.8/site-packages (22.0.4) Collecting pip Downloading pip-22.2.2-py3-none-any.whl (2.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 28.1 MB/s eta 0:00:00 Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.0.4 Uninstalling pip-22.0.4: Successfully uninstalled pip-22.0.4 Successfully installed pip-22.2.2 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Collecting rq-scheduler Downloading rq_scheduler-0.11.0-py2.py3-none-any.whl (12 kB) Collecting croniter>=0.3.9 Downloading croniter-1.3.7-py2.py3-none-any.whl (17 kB) Collecting rq>=0.13 Downloading rq-1.11.0-py2.py3-none-any.whl (70 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.6/70.6 kB 4.7 MB/s eta 0:00:00 Collecting python-dateutil Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 20.2 MB/s eta 0:00:00 Collecting click>=5.0.0 Downloading click-8.1.3-py3-none-any.whl (96 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 13.1 MB/s eta 0:00:00 Collecting redis>=3.5.0 Downloading redis-4.3.4-py3-none-any.whl (246 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 246.2/246.2 kB 28.9 MB/s eta 0:00:00 Collecting six>=1.5 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting deprecated>=1.2.3 Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB) Collecting packaging>=20.4 Downloading packaging-21.3-py3-none-any.whl (40 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 6.4 MB/s eta 0:00:00 Collecting async-timeout>=4.0.2 Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB) Collecting wrapt<2,>=1.10 Downloading wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (81 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.0/81.0 kB 13.0 MB/s eta 0:00:00 Collecting pyparsing!=3.0.5,>=2.0.2 Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 12.7 MB/s eta 0:00:00 Installing collected packages: wrapt, six, pyparsing, click, async-timeout, python-dateutil, packaging, deprecated, redis, croniter, rq, rq-scheduler Successfully installed async-timeout-4.0.2 click-8.1.3 croniter-1.3.7 deprecated-1.2.13 packaging-21.3 pyparsing-3.0.9 python-dateutil-2.8.2 redis-4.3.4 rq-1.11.0 rq-scheduler-0.11.0 six-1.16.0 wrapt-1.14.1 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Removing intermediate container bd8b40a243bd ---> 64af7ddf0828 Step 3/3 : CMD [ "rqscheduler", "--host", "kontext_redis_1", "--db", "2", "-i", "10" ] ---> Running in eced96ae05ca Removing intermediate container eced96ae05ca ---> b99a7530ebd8 Successfully built b99a7530ebd8 Successfully tagged kontext_rq-scheduler:latest WARNING: Image for service rq-scheduler was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build. Building kontext unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /opt/kontext/dockerfiles/Dockerfile.kontext-jammy: no such file or directory ERROR: Service 'kontext' failed to build : Build failed

If we try to install it using LXC containers, we get the following: root@kontext-container:/# cd /opt/kontext/ root@kontext-container:/opt/kontext# sudo -u www-data python3 public/app.py --address 127.0.0.1 --port 8080 Traceback (most recent call last): File "public/app.py", line 76, in from views.tools import bp as tools_bp File "/opt/kontext/public/../lib/views/tools.py", line 24, in from cairosvg import svg2pdf, svg2png, svg2svg File "/usr/local/lib/python3.8/dist-packages/cairosvg/init.py", line 26, in from . import surface # noqa isort:skip File "/usr/local/lib/python3.8/dist-packages/cairosvg/surface.py", line 9, in import cairocffi as cairo File "/usr/local/lib/python3.8/dist-packages/cairocffi/init.py", line 48, in cairo = dlopen( File "/usr/local/lib/python3.8/dist-packages/cairocffi/init.py", line 45, in dlopen raise OSError(error_message) # pragma: no cover OSError: no library called "cairo-2" was found no library called "cairo" was found no library called "libcairo-2" was found cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory root@kontext-container:/opt/kontext#

Any help would be appreciated.

mzimandl commented 2 years ago

Hi,

thanks for reporting this, it seems we have missing Dockerfile.kontext-jammy. The master branch is now pretty much work in progress... But for now you can try some of the release branches like release-0.16.x.