Skip to content

Deploy wp1_selection_tools

benoit74 edited this page Jun 12, 2025 · 4 revisions

wp1_selection_tool software is running on mwcurator machine as a Docker container.

Docker image tag is always latest, which is refreshed at every push to main branch.

If you want to deploy a new version of the image on mwcurator, you first have to run

sudo docker image pull ghcr.io/openzim/wp1_selection_tools
sudo docker stop wp1_selection_tools
sudo docker rm wp1_selection_tools

Command to start the container is then:

sudo docker run --name=wp1_selection_tools --volume=/data/wp1_selection_tools/data:/data --volume=/data/wp1_selection_tools/replica.my.cnf:/root/replica.my.cnf --volume=/data/wp1_selection_tools/remote:/remote --volume=/data/wp1_selection_tools/.ssh/:/root/.ssh --restart=always --detach=true ghcr.io/openzim/wp1_selection_tools

The tool itself is running thanks to a cron task inside the container:

> cat /etc/cron.monthly/wp1_selection_tools
#!/bin/sh
/usr/bin/flock -w 0 /dev/shm/cron.lock /build_all_selections.sh

Should you want to run it immediately, you can start it with something like the following command (preferably to run from a screen session):

sudo docker exec -it wp1_selection_tools /usr/bin/flock -w 0 /dev/shm/cron.lock /build_all_selections.sh

or to build only one language selection (e.g. en here, note that en must be run before other selections for proper operation), timestamp the logs and store them in a file:

sudo docker exec -it wp1_selection_tools /usr/bin/flock -w 0 /dev/shm/cron.lock /build_selections.sh en | ts > ~/wp1_selection_en.log 2>&1
Clone this wiki locally