{"id":23197003,"url":"https://github.com/brakmic/hpx_docker","last_synced_at":"2026-02-15T09:04:02.918Z","repository":{"id":268282282,"uuid":"903859070","full_name":"brakmic/HPX_Docker","owner":"brakmic","description":"A pre-configured environment for C++ to efficiently build and develop applications using HPX","archived":false,"fork":false,"pushed_at":"2025-06-30T11:52:47.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T19:33:56.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brakmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-15T18:30:21.000Z","updated_at":"2025-06-30T11:52:51.000Z","dependencies_parsed_at":"2024-12-15T19:34:11.107Z","dependency_job_id":"75c8dbfe-2fb4-4c99-8cc5-98fb5a3dc0a4","html_url":"https://github.com/brakmic/HPX_Docker","commit_stats":null,"previous_names":["brakmic/hpx_docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brakmic/HPX_Docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brakmic","download_url":"https://codeload.github.com/brakmic/HPX_Docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29474426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T06:58:05.414Z","status":"ssl_error","status_checked_at":"2026-02-15T06:58:05.085Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-18T14:27:34.845Z","updated_at":"2026-02-15T09:04:02.895Z","avatar_url":"https://github.com/brakmic.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HPX Builder Docker Image\n\n![Docker Pulls](https://img.shields.io/docker/pulls/brakmic/hpx-builder)\n![Docker Image Size](https://img.shields.io/docker/image-size/brakmic/hpx-builder/latest)\n![GitHub License](https://img.shields.io/github/license/brakmic/hpx_docker)\n\n## Table of Contents\n\n- [HPX Builder Docker Image](#hpx-builder-docker-image)\n  - [Table of Contents](#table-of-contents)\n  - [Introduction](#introduction)\n  - [Features](#features)\n  - [Getting Started](#getting-started)\n    - [Prerequisites](#prerequisites)\n    - [Pulling the Docker Image](#pulling-the-docker-image)\n    - [Running the Builder Container](#running-the-builder-container)\n  - [Using the HPX Builder](#using-the-hpx-builder)\n    - [Locating HPX Libraries and Headers](#locating-hpx-libraries-and-headers)\n    - [Configuring Your C++ Application](#configuring-your-c-application)\n    - [Compiling and Linking Your Application](#compiling-and-linking-your-application)\n  - [Example: Simple HPX Application](#example-simple-hpx-application)\n    - [Project Structure](#project-structure)\n    - [CMake Configuration](#cmake-configuration)\n    - [Example HPX Application](#example-hpx-application)\n    - [Building the Example](#building-the-example)\n    - [Running the Example](#running-the-example)\n  - [Advanced Usage](#advanced-usage)\n    - [Custom Build Arguments](#custom-build-arguments)\n    - [Mounting Volumes for Development](#mounting-volumes-for-development)\n    - [Integration with CI/CD](#integration-with-cicd)\n  - [License](#license)\n\n## Introduction\n\nThe **HPX Builder Docker Image** provides a pre-configured environment for C++ developers to efficiently build and develop applications using [HPX](https://hpx.stellar-group.org/), a high-performance parallel and distributed runtime system. By leveraging Docker, this image ensures a consistent development setup across different machines and environments, eliminating the \"it works on my machine\" problem.\n\n## Features\n\n- **Precompiled HPX Libraries:** Quickly integrate HPX into your projects without manual compilation.\n- **Boost.Asio Integration:** Utilizes Boost.Asio for asynchronous operations, ensuring compatibility and performance.\n- **Memory Allocator Support:** Configured to use `jemalloc` for optimized memory management.\n- **Customizable Builds:** Supports build arguments to tailor the HPX build to your specific requirements.\n- **Efficient Docker Layers:** Optimized Dockerfile structure for faster builds and smaller image sizes.\n- **Comprehensive Logging:** Provides detailed build logs to assist in monitoring and debugging.\n\n## Getting Started\n\n### Prerequisites\n\n- **Docker:** Ensure Docker is installed on your system. You can download it from [here](https://www.docker.com/get-started).\n- **C++ Development Environment:** Familiarity with C++ and CMake for building HPX applications.\n\n### Pulling the Docker Image\n\nRetrieve the latest HPX Builder image from Docker Hub:\n\n```bash\ndocker pull brakmic/hpx-builder:latest\n```\n\n### Running the Builder Container\n\nLaunch an interactive container using the HPX Builder image:\n\n```bash\ndocker run --rm -it brakmic/hpx-builder:latest /bin/bash\n```\n\nThis command starts a container and opens a bash shell, allowing you to interact with the HPX environment.\n\n## Using the HPX Builder\n\n### Locating HPX Libraries and Headers\n\nWithin the running container, HPX is installed at `/usr/local/hpx`. The libraries and headers can be found in the following directories:\n\n- **Headers:** `/usr/local/hpx/include/`\n- **Libraries:** `/usr/local/hpx/lib/`\n\n### Configuring Your C++ Application\n\nTo utilize HPX in your C++ project, configure your `CMakeLists.txt` to find and link against the HPX libraries provided by the builder image.\n\n**Example `CMakeLists.txt`:**\n\n```cmake\ncmake_minimum_required(VERSION 3.15)\nproject(MyHPXApp)\n\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\n\n# Specify the path to HPX installation\nset(HPX_ROOT \"/usr/local/hpx\")\n\n# Find HPX\nfind_package(HPX REQUIRED)\n\nadd_executable(my_hpx_app src/main.cpp)\n\n# Link HPX libraries\ntarget_link_libraries(my_hpx_app PRIVATE HPX::hpx HPX::wrap_main)\n```\n\n### Compiling and Linking Your Application\n\nWithin the builder container, navigate to your project directory and build your application using CMake and Make.\n\n**Steps:**\n\n1. **Navigate to Project Directory:**\n\n   ```bash\n   cd /path/to/your/project\n   ```\n\n2. **Create a Build Directory:**\n\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   ```\n\n3. **Configure the Project with CMake:**\n\n   ```bash\n   cmake .. -DCMAKE_PREFIX_PATH=/usr/local/hpx\n   ```\n\n4. **Build the Project:**\n\n   ```bash\n   make -j$(nproc)\n   ```\n\nThis process compiles your application and links it against the precompiled HPX libraries.\n\n## Example: Simple HPX Application\n\nTo demonstrate the usage of the HPX Builder image, let's walk through building a simple HPX-based C++ application.\n\n### Project Structure\n\n```\nmy_hpx_app/\n├── CMakeLists.txt\n└── src/\n    └── main.cpp\n```\n\n### CMake Configuration\n\n**`CMakeLists.txt`:**\n\n```cmake\ncmake_minimum_required(VERSION 3.15)\nproject(MyHPXApp)\n\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\n\n# Specify the path to HPX installation\nset(HPX_ROOT \"/usr/local/hpx\")\n\n# Find HPX\nfind_package(HPX REQUIRED)\n\nadd_executable(my_hpx_app src/main.cpp)\n\n# Link HPX libraries\ntarget_link_libraries(my_hpx_app PRIVATE HPX::hpx HPX::wrap_main)\n```\n\n### Example HPX Application\n\n**`src/main.cpp`:**\n\n```cpp\n#include \u003chpx/hpx_main.hpp\u003e\n#include \u003chpx/include/parallel_sort.hpp\u003e\n#include \u003cvector\u003e\n#include \u003calgorithm\u003e\n#include \u003ciostream\u003e\n\nint main()\n{\n    // Initialize a vector with unsorted integers\n    std::vector\u003cint\u003e data = {50, 20, 40, 10, 30};\n\n    std::cout \u003c\u003c \"Before HPX sort: \";\n    for(auto num : data)\n        std::cout \u003c\u003c num \u003c\u003c \" \";\n    std::cout \u003c\u003c std::endl;\n\n    // Perform parallel sort using HPX\n    hpx::sort(hpx::execution::par, data.begin(), data.end());\n\n    std::cout \u003c\u003c \"After HPX sort: \";\n    for(auto num : data)\n        std::cout \u003c\u003c num \u003c\u003c \" \";\n    std::cout \u003c\u003c std::endl;\n\n    return 0;\n}\n```\n\n### Building the Example\n\n1. **Start the Builder Container:**\n\n   ```bash\n   docker run --rm -it -v $(pwd)/my_hpx_app:/app brakmic/hpx-builder:latest /bin/bash\n   ```\n\n   *This command mounts your local `my_hpx_app` directory to `/app` inside the container.*\n\n2. **Navigate to the Application Directory:**\n\n   ```bash\n   cd /app\n   ```\n\n3. **Create and Navigate to Build Directory:**\n\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   ```\n\n4. **Configure the Project with CMake:**\n\n   ```bash\n   cmake .. -DCMAKE_PREFIX_PATH=/usr/local\n   ```\n\n5. **Build the Application:**\n\n   ```bash\n   make -j$(nproc)\n   ```\n\n### Running the Example\n\nAfter a successful build, run the application:\n\n```bash\n./my_hpx_app\n```\n\n**Expected Output:**\n\n```\nBefore HPX sort: 50 20 40 10 30 \nAfter HPX sort: 10 20 30 40 50 \n```\n\nThis output confirms that HPX successfully sorted the vector in parallel.\n\n## Advanced Usage\n\n### Custom Build Arguments\n\nThe HPX Builder image supports build arguments to customize the HPX build process.\n\n- **`HPX_TAG`**: Specifies the HPX version to build.\n  - **Default**: `v1.11.0`\n  - **Usage**:\n    ```bash\n    docker build -t brakmic/hpx-builder:v1.11.0 \\\n      -f docker/hpx-builder.Dockerfile \\\n      --build-arg HPX_TAG=v1.11.0 \\\n      .\n    ```\n\n- **`HPX_WITH_ASIO`**: Configures HPX to use either Boost.Asio or standalone Asio.\n  - **Options**: `Boost`, `ASIO`\n  - **Default**: `ASIO`\n  - **Usage**:\n    ```bash\n    docker build -t brakmic/hpx:v1.11.0-asio \\\n      -f docker/hpx-builder.Dockerfile \\\n      --build-arg HPX_WITH_ASIO=ASIO \\\n      .\n    ```\n\n### Mounting Volumes for Development\n\nFor an efficient development workflow, mount your local project directory into the container. This allows you to edit files locally and build within the container.\n\n**Example Command:**\n\n```bash\ndocker run --rm -it \\\n  -v $(pwd)/my_hpx_app:/app \\\n  brakmic/hpx-builder:latest \\\n  /bin/bash\n```\n\n**Inside the Container:**\n\n1. **Navigate to the Mounted Directory:**\n\n   ```bash\n   cd /app\n   ```\n\n2. **Build as Usual:**\n\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   cmake .. -DCMAKE_PREFIX_PATH=/usr/local\n   make -j$(nproc)\n   ```\n\n### Integration with CI/CD\n\nIntegrate the HPX Builder image into your Continuous Integration/Continuous Deployment (CI/CD) pipelines to automate the build and testing of your HPX-based applications.\n\n**Example GitHub Actions Workflow:**\n\n```yaml\nname: Build and Test HPX Application\n\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Checkout Repository\n      uses: actions/checkout@v3\n\n    - name: Set up Docker Buildx\n      uses: docker/setup-buildx-action@v2\n\n    - name: Build HPX Builder Image\n      run: |\n        docker build -t brakmic/hpx-builder:latest \\\n          -f docker/hpx-builder.Dockerfile \\\n          .\n\n    - name: Build Application\n      run: |\n        docker run --rm -v ${{ github.workspace }}/my_hpx_app:/app \\\n          brakmic/hpx-builder:latest \\\n          bash -c \"cd /app \u0026\u0026 mkdir build \u0026\u0026 cd build \u0026\u0026 cmake .. -DCMAKE_PREFIX_PATH=/usr/local \u0026\u0026 make -j$(nproc)\"\n\n    - name: Run Tests\n      run: |\n        docker run --rm -v ${{ github.workspace }}/my_hpx_app:/app \\\n          brakmic/hpx-builder:latest \\\n          bash -c \"cd /app/build \u0026\u0026 ./my_hpx_app\"\n```\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fhpx_docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrakmic%2Fhpx_docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fhpx_docker/lists"}