Cms was installed onto a raspberry pi running 64x raspbian through docker. This document details the process. It assumes you are working from the terminal.
sudo apt-get update && sudo apt-get upgrade to have up-to-date apt info
Note that we install through the docker route to avoid the suffering that comes with manually resolving dependencies.
- Install git thru apt with
sudo apt-get install git. - Clone cms source from
https://github.com/cms-dev/cmswithgit clone https://github.com/cms-dev/cms
We need to install the docker compose plugin for cms. Installing docker-compse from apt does not acheive this. Thus, follow the instructions from the official docker docs first here then do here.
Specifically for the raspberry pi that runs on arm64, you need to change this line in cms/Dockerfile.
OLD:
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/isolate.asc]" \
"http://www.ucw.cz/isolate/debian/ ${CODENAME}-isolate main" \
NEW:
echo "deb [signed-by=/etc/apt/keyrings/isolate.asc]" \
"http://www.ucw.cz/isolate/debian/ bookworm-isolate main" \TODO: Make a git issue? [If this works.] Force bookworm to allow amd64 install.
To ensure non-messed up permissions, in cms/Dockerfile add this line at the end before the CMD line.
RUN chmod 777 /home/cmsuser/src /home/cmsuser/cmsNote: Check why the dockerfile messes it up
Note: Ugly bandaid solution.
Source here
- Go into
cms. - Run
sudo docker/cms-test.sh - Ensure it finishes without errors. (Or see errors and hope its okay 💀)
- Run
docker rm -f cms-main-testdb-1to delete the db created in this process. It is okay if it fails, its not important.
Note that the tests (#2) will take forever to run. It is responsible for building the whole cms then running sanity checks on it.
instructions from here)
In the first run, you need to set up the database.
- Run with
sudo docker/cms-dev.sh. It will put you in a bash shell. - Run
createdb -h devdb -U postgres cmsdbin that shell - Run
cmsInitDBin that shell
Note: Can you easily ignore/not use/deactivate the demo contest?
>>> git clone https://github.com/cms-dev/con_test.git
>>> cd con_test
>>> cmsImportUser --all
>>> cmsImportContest -i .Now, test it.
cmsContestWebServerYou should be able to access the page at [IP]:8888 if all goes well.
- Enter the shell in the docker container with
sudo docker/cms-dev.sh - Run
cmsAddAdmin [any_name_you_want]to make an admin account - Run
cmsAdminWebServerto start the admin page - Access admin page at
[IP]:8889
- Enter the shell in the docker container with
sudo docker/cms-dev.sh - Run the services you need one by one.
You would normally run with cmsLogService & then cmsResourceService -a && fg to run everything. But this spawns waaay too many workers and it blows up.