As for the inference part, the Annif API works great but I can't seem to be able to get it running on Docker. When I do docker compose up, I get:
WARN[0000] /mnt/c/Users/jdetorre/workspace/cyclops/annif-docker/docker-compose.yaml: `version` is obsolete
WARN[0000] Found orphan containers ([annif-docker-annif-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Running 0/2
⠙ Container annif-docker-annif_app-1 Recreated 0.1s
⠋ Container annif-docker-nginx-1 Recreated 0.0s
Attaching to annif_app-1, nginx-1
annif_app-1 | [2025-03-19 16:12:14 +0000] [1] [INFO] Starting gunicorn 23.0.0
annif_app-1 | [2025-03-19 16:12:14 +0000] [1] [INFO] Listening at:
http://0.0.0.0:8000 (1)
annif_app-1 | [2025-03-19 16:12:14 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
annif_app-1 | [2025-03-19 16:12:14 +0000] [7] [INFO] Booting worker with pid: 7
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: using the "epoll" event method
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: nginx/1.27.4
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: built by gcc 12.2.0 (Debian 12.2.0-14)
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: OS: Linux 5.15.167.4-microsoft-standard-WSL2
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker processes
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 10
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 11
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 12
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 13
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 14
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 15
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 16
nginx-1 | 2025/03/19 16:12:14 [notice] 9#9: start worker process 17
annif_app-1 | INFO:annif:finished initializing projects
annif_app-1 | [2025-03-19 16:12:16 +0000] [7] [INFO] Started server process [7]
annif_app-1 | [2025-03-19 16:12:16 +0000] [7] [INFO] Waiting for application startup.
annif_app-1 | [2025-03-19 16:12:16 +0000] [7] [INFO] Application startup complete.
docker-compose.yaml:
version: "3"
services:
annif_app:
image:
quay.io/natlibfi/annif:latest volumes:
- .:/annif-projects
# user: jdetorre:sample_pw
command: ["gunicorn", "annif:create_app()", "--bind", "
0.0.0.0:8000", "--timeout", "600"]
nginx:
image: nginx
ports:
- "80:80"
depends_on:
- annif_app
command: |
bash -c 'bash -s <<EOF
cat > /etc/nginx/conf.d/default.conf <<EON
server {
listen 80;
server_name localhost;
location / {
proxy_pass
http://annif_app:8000;
}
}
EON
nginx -g "daemon off;";
EOF'
The directory that is being mounted:
(annif-venv) mnt/c/Users/jdetorre/workspace/cyclops/annif-docker# ls -R
.:
Dockerfile data docker-compose.or docker-compose.yaml projects.cfg requirements.txt
./data:
projects vocabs
./data/projects:
eurovoc-mllm-en
./data/projects/eurovoc-mllm-en:
mllm-model.gz mllm-train.gz
./data/vocabs:
eurovoc
./data/vocabs/eurovoc:
subjects.csv subjects.dump.gz subjects.tsv subjects.ttl
How do I fix this? I want to be able to access Annif in my browser, with the model I trained on my local, on Docker...What do you think?
Kind regards,