Manta Light =========== Manta Light is designed to run inside containers deployed on nodes, allowing tasks to execute in isolated environments. This section will guide you on how to build Docker images with Manta-Light and the required dependencies for your custom algorithms. .. note:: Manta-Light will always be used within containers, so the installation procedure focuses on building the right Docker images that include Manta-Light, required dependencies, and your algorithm-specific packages. Downloading the Wheel File -------------------------- 1. **Download the Manta-Light Wheel File**: Obtain the pre-built wheel file for Manta-Light from the official release `repository `_. 2. **Install the Wheel File**: Use :code:`pip` to install the downloaded wheel file. Run the following command in your terminal: .. code:: bash pip install manta_light--py3-none-any.whl This method is ideal for most users as it reduces compatibility issues and streamlines the installation process. Building the Docker Image ------------------------- To build a Docker image with Manta-Light, you'll need to create a Dockerfile. Below is an example Dockerfile that explains how to set up the image using the Manta-Light wheel file. It also highlights sections where you can add your custom dependencies. Dockerfile Example ^^^^^^^^^^^^^^^^^^ .. code:: dockerfile # Use an official Python runtime as a parent image FROM python:3.12-slim AS build # Set the working directory in the container WORKDIR /usr/src/ # Install necessary system packages RUN apt-get update && apt-get clean # Upgrade pip RUN pip install --upgrade pip # Install the Manta-Light wheel file COPY manta_light--py3-none-any.whl ./ RUN pip install manta_light--py3-none-any.whl # --- User Section: Add your required dependencies here --- # Copy your requirements file if you have additional dependencies # Example: # COPY requirements.txt ./ # RUN pip install -r requirements.txt # ---------------------------------------------------------- # Reduce the size of the container by creating a clean, final stage FROM python:3.12-slim # Copy the installed Python packages from the build stage COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages # --- User Section: Add additional commands if needed --- # For example, setting environment variables or copying other files # ---------------------------------------------------------- Explanation of the Dockerfile ***************************** 1. **Base Image**: The Dockerfile starts with a Python 3.12 slim image to keep the container lightweight. 2. **Install Manta-Light**: The Manta-Light wheel file is installed in the build stage to ensure all dependencies are configured correctly. 3. **User Dependencies**: A placeholder section is provided for users to add their dependencies. Here, users can include any additional Python packages required for their algorithms by copying their requirements.txt file and installing them. 4. **Final Stage**: The final stage reduces the container size by only copying the required files and libraries from the build stage. 5. **Custom Additions**: Users can modify the Dockerfile further to include any specific configurations or setup commands needed for their environment. This approach ensures a modular and flexible way to create Docker images with Manta-Light, tailored to the needs of your deployed tasks. Modify the Dockerfile as needed to include your custom dependencies and environment setup.