Building and Starting the Project

To build and start the Screenly Anthias project, follow the instructions below. These instructions take into consideration that you have the necessary development environment set up and that you’re familiar with using Docker and other relevant tools.

1. Hardware Requirements

Before proceeding, be aware that building this project requires powerful hardware, ideally a virtual machine with at least 32 vCPUs and 128GB RAM. If building locally, adjustments to MAKE_CORES may be needed, but a minimum of 32GB RAM is recommended.

# Example for setting MAKE_CORES in a shell
export MAKE_CORES=4  # or any suitable number based on your hardware

2. Clone the Repository

Clone the project from the GitHub repository.

git clone https://github.com/Screenly/Anthias.git
cd Anthias

3. Environment Setup

Install the dependencies required for building the project. This generally includes building essential packages, libraries, and tools needed by the various components of the project.

# Example installation for Debian-based systems
sudo apt update
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev python3-pip

4. Build the Docker Image

Use the provided Docker configuration to build the image. Specify the desired service, target platform, and additional options as needed.

# Create a build script
import subprocess

def build_docker_image():
    service = 'viewer'  # Choose the service you want to build (viewer, server etc.)
    board = 'x86'  # Specify your board
    target_platform = 'linux/amd64'
    disable_cache_mounts = False
    git_hash = 'latest'  # or a specific commit hash
    environment = 'development'  # or production

    subprocess.run([
        'python3', 'tools/image_builder/__main__.py',
        service, board, target_platform,
        str(disable_cache_mounts), git_hash,
        environment
    ])

build_docker_image()

5. Run the Development Server

Once the Docker image is successfully built, run the development server. This step is crucial to ensure everything is set up properly.

# Run the server using Docker
docker run -d --name anthias_server -p 80:80 anthias:latest

Ensure to replace anthias:latest with the appropriate image tag if necessary.

6. Testing the Installation

After running the server, it’s important to conduct both automated unit tests and manual testing.

  • Unit Tests: They can be executed using the existing test framework integrated within the repository. Typically, you would run:
# Example to run tests
pytest tests/  # Assuming you have pytest set up
  • Manual Testing: While the unit tests will cover many cases, you should manually check various functionalities to make sure everything operates as expected.

Ensure to reference the QA checklist for any specific manual testing steps.

7. Post-Installation

After setup and verification, it’s crucial to finalize the installation by performing any cleanup or additional configuration steps as required by your environment or deployment strategy.

# Example cleanup tasks
docker system prune -f  # Clean up unused Docker data

Conclusion

Following the above steps should successfully build and launch the Anthias project. Further details about specific configurations and advanced options can be explored in the relevant sections of the documentation.

Remember to stay updated with any changes in the repository or new releases to ensure your installation reflects the latest enhancements.

Source: README.md, webview/readme.md, docs/developer-documentation.md, tools/image_builder/main.py.