{"id":22574844,"url":"https://github.com/thoth-station/s2i-thoth","last_synced_at":"2025-09-14T03:21:11.004Z","repository":{"id":41873458,"uuid":"202740363","full_name":"thoth-station/s2i-thoth","owner":"thoth-station","description":"Thoth's addition to OpenShift's s2i Python builds to benefit from Thoth's recommendations in your application","archived":false,"fork":false,"pushed_at":"2023-10-18T00:24:13.000Z","size":717,"stargazers_count":6,"open_issues_count":25,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T16:31:43.559Z","etag":null,"topics":["ai","hacktoberfest","openshift","python","python3","s2i","software-stack","thoth"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoth-station.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-16T14:18:25.000Z","updated_at":"2022-09-20T07:04:20.000Z","dependencies_parsed_at":"2025-04-10T16:11:34.468Z","dependency_job_id":"692d4581-f690-461d-9e2e-755e3721997c","html_url":"https://github.com/thoth-station/s2i-thoth","commit_stats":null,"previous_names":[],"tags_count":78,"template":false,"template_full_name":null,"purl":"pkg:github/thoth-station/s2i-thoth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fs2i-thoth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fs2i-thoth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fs2i-thoth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fs2i-thoth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoth-station","download_url":"https://codeload.github.com/thoth-station/s2i-thoth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fs2i-thoth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275056096,"owners_count":25397783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai","hacktoberfest","openshift","python","python3","s2i","software-stack","thoth"],"created_at":"2024-12-08T03:08:11.317Z","updated_at":"2025-09-14T03:21:10.978Z","avatar_url":"https://github.com/thoth-station.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"s2i-thoth\n---------\n\n\n  **HIBERNATION NOTICE**: The Project is currently hibernating. If you are interested\n  in contributing to is, or if you have urgent issues that need to be fixed, please\n  reach out to the Thoth team via `an support issue \u003chttps://github.com/thoth-station/support/issues/new/choose\u003e`_.\n\n\n.. |s2i-thoth-ubi8-py39 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py39/status\n\n.. |s2i-thoth-ubi8-py38 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py38/status\n\n.. |s2i-thoth-ubi8-py36 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py36/status\n\n.. |s2i-thoth-f34-py39 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-f34-py39/status\n\n.. |s2i-thoth-f35-py310 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-f35-py310/status\n\n.. |s2i-thoth-ubi9-py39 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-ubi9-py39/status\n\nExperimental Thoth container images:\n\n.. list-table:: s2i Thoth Images\n   :widths: 40 30\n   :header-rows: 1\n\n   * - Image\n     - Status\n   * - `s2i-thoth-ubi8-py39 \u003chttps://quay.io/repository/thoth-station/s2i-thoth-ubi8-py39\u003e`_\n     - |s2i-thoth-ubi8-py39 on Quay|\n   * - `s2i-thoth-ubi8-py38 \u003chttps://quay.io/repository/thoth-station/s2i-thoth-ubi8-py38\u003e`_\n     - |s2i-thoth-ubi8-py38 on Quay|\n   * - `s2i-thoth-ubi8-py36 \u003chttps://quay.io/repository/thoth-station/s2i-thoth-ubi8-py36\u003e`_\n     - |s2i-thoth-ubi8-py38 on Quay|\n   * - `s2i-thoth-f34-py39 \u003chttps://quay.io/repository/thoth-station/s2i-thoth-f34-py39\u003e`_\n     - |s2i-thoth-f34-py39 on Quay|\n   * - `s2i-thoth-f35-py310 \u003chttps://quay.io/repository/thoth-station/s2i-thoth-f35-py310\u003e`_\n     - |s2i-thoth-f35-py310 on Quay|\n   * - `s2i-thoth-ubi9-py39 \u003chttps://quay.io/repository/thoth-station/s2i-thoth-ubi9-py39\u003e`_\n     - |s2i-thoth-ubi9-py39 on Quay|\n\nArtifacts needed to build `s2i-thoth-*` container images.\n\nThese container images are compliant with OpenShift's s2i build process to\nbuild Python applications. They extend the functionality of base s2i Python\ncontainer images so that applications using these container images benefit from\nThoth's recommendations.\n\nSee `thoth-station/s2i-example\n\u003chttps://github.com/thoth-station/s2i-example\u003e`__ repository with OpenShift s2i\nexamples.\n\n**Note:** When using Thoth S2I build process, it is required to use\n``.thoth.yaml`` file even if all the Thoth features are turned off. A simple\n``.thoth.yaml`` file as generated by ``thamos config`` should work in\nmost cases (see `thamos repository \u003chttps://github.com/thoth-station/thamos\u003e`__\nfor more info).\n\nConfiguration options\n=====================\n\nConfiguration options for Thoth's s2i image:\n\n* ``THOTH_ADVISE`` - always use the recommended stack by Thoth (even if the lock file is present in the repo)\n* ``THOTH_OFF`` - disable all the Thoth features, only ``THOTH_FORCE_GENERATE_CONFIG`` can be supplied if ``.thoth.yaml`` is not available\n* ``THOTH_CONFIG_CHECK`` - verify values stated in the configuration file match the build environment\n* ``THOTH_FORCE_GENERATE_CONFIG`` - generate configuration file during the build process, overwrites already existing configuration file if present\n* ``THOTH_PROVENANCE_CHECK`` - verify stack provenance - the provenance check is triggered only if the lock file is not comming from Thoth's recommendation engine (otherwise the stack has already verified provenance)\n* ``THOTH_ASSEMBLE_DEBUG`` - run s2i's assemble script in verbose mode\n* ``THOTH_DRY_RUN`` - submit stack to Thoth's recommendation engine but do **NOT** use the recommended lock file, use the lock file present in the repo instead\n* ``THOTH_FROM_MASTER`` - Use Thamos from git instead of a PyPI release - handy if the released Thamos has a bug which was fixed in the master branch\n* ``THOTH_HOST`` - Thoth's host to reach out to for recommendations (defaults to prod deployment at khemenu.thoth-station.ninja)\n* ``THOTH_ERROR_FALLBACK`` - fallback to the lock file present in the repository if the submitted Thoth analysis fails\n\nSee also configuration options for Thoth's client present in `Thamos repository\n\u003chttps://github.com/thoth-station/thamos/#using-thoth-and-thamos-in-openshifts-s2i\u003e`_.\n\nBuilding container images\n=========================\n\nContainer images are automatically built in quay.io when pushed to master branch.\n\nBuilding container images locally\n=================================\n\nIf you wish to build container images locally, you can do so (an example for\n``ubi8-py39``):\n\n.. code-block:: console\n\n  podman build -f ubi8-py39/Dockerfile\n\nUpdating the dependencies\n=========================\n\nThis script can be used for updating the requirements for each of the environments.\n\nExecute command: `./update-requirements.sh \u003csub-directories\u003e`\n\nExample: `./update-requirements.sh ubi8-py39 f34-py39`\n\nPrerequisite: Pipenv, micropipenv and different Python interpreter versions\n\nUpdating and releasing new container images\n===========================================\n\nThis repository is managed by `Kebechet\n\u003chttps://github.com/thoth-station/kebechet/\u003e`__ so updates of all the Python\npackages it uses are performed automatically. If you wish to release a new\nversion of Thoth's s2i, you can do so by performing:\n\n.. code-block:: console\n\n  find -iname Dockerfile -exec sed -i 's/THOTH_S2I_VERSION=0.23.0/THOTH_S2I_VERSION=0.24.0/g' {} \\; \u0026\u0026 git commit -m \"Version 0.24.0\" . \u0026\u0026 git tag v0.24.0\n\nA subsequent pull request to this repository is needed.\n\n-----------------------------------------\nS2I Assemble Patches\n-----------------------------------------\n\nMost of the work when releasing a new container image comes from updating the ``s2i_assemble.patch`` file.\nThis file dictates how to change the base image's s2i assemble script, usually available at ``/usr/libexec/s2i/assemble`` of a container running the base image, to provide the new image with everything it may need.\nAs with any patch file, the ``s2i_assemble.patch`` can be generated manually, however this is not recommended.  The recommended methodology to create one is as follows:\n\n1. create directories ``a`` and ``b`` in the root of the `s2i-thoth` repo.\n2. find the ``assemble`` script of your base image.\n\n  - This starts by finding the base image. For instance, fedora base images are available at ``registry.fedoraproject.org/``\n  - Either:\n\n    A. locate the ``s2i/assemble`` script in source from wherever the image is built. This varies depending on what type of image it is. Copy this file to ``a/assemble``.\n\n    B. create a temporary Dockerfile using the base image that will print its s2i ``assemble`` script. Then build a new image (``podman build .``) using that base image, copy that output and save it to ``a/assemble``. It is perfered that you can find it in source because any added whitespacing will not present an issue when you go to build the final image.\n      - Dockerfile Example for f34:\n      .. code-block:: console\n\n        FROM registry.fedoraproject.org/f34/python3:0-31.container\n        RUN cat /usr/libexec/s2i/assemble\n\n3. Construct a new s2i ``assemble`` script in ``b/assemble``. This should reflect what you want the final patched s2i assemble script to be.\n\n  - For reference on what your final assemble script should look like refer to any image overlay in this repository. Find its base image s2i assemble script as described above, and patch it with the ``s2i_assemble.patch`` in the corresponding directory, ex: ``patch a/assemble -i \u003cOVERLAY_NAME\u003e/s2i_assemble.patch``. If this succeeds it will modify the base ``assemble`` script with your patch, and can serve as an example of what your final s2i assemble script should look like.\n  - NOTE: this may vary a lot by image, so thinnk about what the image chooses to include and remove rather than attempting to replicate it exactly for another overlay.\n\n4. Run a diff between ``a/assemble`` and ``b/assemble``, and the output should become your ``s2i_assemble.patch``. Make sure to place it in the correct overlay. Example: ``diff -u a/assemble b/assemble \u003e \u003cOVERLAY_NAME\u003e/s2i_assemble.patch``.\n5. Verify that your image builds correctly. Navigate to your overlay directory with the new ``Dockerfile``, ``requirements.in``, ``requirements.txt``, and ``s2i_assemble.patch`` that you just generated. Run ``podman build .`` in the new overlay to verify that the image is buildable.\n\nImporting image into OpenShift's registry\n=========================================\n\n.. code-block:: console\n\n  oc import-image quay.io/thoth-station/s2i-thoth-ubi8-py39 -n \u003cyour-namespace\u003e\n  oc import-image quay.io/thoth-station/s2i-thoth-f34-py39 -n \u003cyour-namespace\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoth-station%2Fs2i-thoth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoth-station%2Fs2i-thoth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoth-station%2Fs2i-thoth/lists"}