This repository contains code for the containerization of Automated Theorem Proving (ATP) systems. It also includes deployment scripts for these ATP containers within a containerized StarExec environment, utilizing Podman or Kubernetes with MicroK8s or Amazon EKS. The following guide explains how to set up the system.
- Install
podman: Follow the installation guide.- Ensure that you own
$HOME/.configand you have read-write permission. - Check if you already have it installed with
podman --version. - macOS: Run
brew install podmanand start the Podman daemon withpodman machine start. - Ubuntu: Execute
sudo apt install podmanorsnap install podman --classic. - Fedora: Execute
sudo dnf install podman. - Verify installation with
podman --version.
- Ensure that you own
- Containerize StarExec:
- Go to the
starexec-containeriseddirectory to build containerised StarExec. - Test the containerized StarExec using traditional StarExec
.tgz/.zippackages.
- Go to the
There are three types of ATP system packages that can be used in various ways in containerized StarExec:
- Traditional StarExec
.tgz/.zippackages:- Can run in containerized StarExec
- This works because:
- The
.tgz/.zipcontains neitherrun_image.pynorrun_image_k8s.py - StarExec uses the local backend to start
runsolverin the traditional StarExec way.
- The
- Cannot (or at least hould not) be used in containerized StarExec that is deployed in Kubernetes (microk8s or AWS)
- Containerized ATP Systems:
- Go to the
provers-containeriseddirectory to build containerised ATP systems. - Test in a terminal containerised ATP systems using the
run_image.pyscript. - Cannot (or should not) be used in containerised StarExec.
- Go to the
- Proxy-Prover ATP Systems:
- Build a plain containerised ATP system first.
- Go to the
starexec-proxy-proversdirectory to build local proxy-prover ATP systems for podman. - Test local proxy-prover ATP systems using containerized StarExec.
- Containerized StarExec detects the
run_image.pyscript. - It uses the local backend, which uses
run_image.py, which uses podman to run the container.
- Containerized StarExec detects the
- Go to the
starexec-proxy-proversdirectory to build non-local proxy-prover ATP systems for Kubernetes. - Test the proxy-prover ATP systems using containerized StarExec.
- Containerized StarExec detects the
run_image_k8s.pyscript. - It uses the Kubernetes backend, which uses
kubectlto manage the container within Kubernetes.
- Containerized StarExec detects the
- Using EKS:
- Install
kubectl:- macOS: Run
brew install kubectl. - Ubuntu: Execute
snap install kubectl --classic. - Verify installation with
kubectl version.
- macOS: Run
- Install
- Using MicroK8s:
- Installation:
- macOS: MicroK8s is not natively supported. Install via a Multipass virtual machine as per the MicroK8s macOS installation guide.
- Ubuntu:
- Run
snap install microk8s --classic. - Add your user to the
microk8sgroup:sudo usermod -aG microk8s $USER. - Change ownership:
sudo chown -f -R $USER ~/.kube. - Reload group memberships:
newgrp microk8s. - Optionally, add
alias kubectl='microk8s kubectl'to your shell configuration file.
- Run
- Verification:
- Check status with
microk8s status --wait-ready. - List nodes using
microk8s kubectl get nodes.
- Check status with
- Installation:
- Deploy StarExec:
- Navigate to the
starexec-kubernetesdirectory to deploy StarExec on MicroK8s or EKS. - Access the deployed StarExec website to upload your proxy-prover ATP systems and problem files.
- URL Access:
- MicroK8s: Run
microk8s kubectl get svcto obtain the URL. - EKS without Route53: Execute
kubectl get svcto get the URL. - EKS with Route53: The URL follows the format
https://your_Route53_domaster.
- MicroK8s: Run
- Open the URL in your browser to start using StarExec.
- URL Access:
- Navigate to the
Building a Container Image:
podman/docker build -t <TAG_NAME> <PATH_TO_DIRECTORY_WITH_DOCKERFILE>Running a Container (Entrypoint):
podman/docker run --rm [--entrypoint <ENTRYPOINT_FILE>] <TAG_NAME> <ARGS>Running a Container (Interactive Shell):
podman/docker run --rm -it <TAG_NAME>Cleanup (Podman):
podman system prune --all --force && podman rmi --allForced Cleanup (Podman):
podman rmi --all --forceCleanup (Docker):
docker system prune --all --force && docker rmi $(docker images -a -q)