{"id":22574819,"url":"https://github.com/thoth-station/thamos","last_synced_at":"2026-02-26T21:46:19.668Z","repository":{"id":37962459,"uuid":"147527172","full_name":"thoth-station/thamos","owner":"thoth-station","description":"A CLI tool and library for communicating with Thoth","archived":false,"fork":false,"pushed_at":"2023-05-30T08:38:35.000Z","size":2777,"stargazers_count":14,"open_issues_count":8,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-11-28T05:24:36.376Z","etag":null,"topics":["artificial-intelligence","commandline","hacktoberfest","thoth"],"latest_commit_sha":null,"homepage":"http://thoth-station.ninja","language":"Python","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":null,"security":null,"support":null,"governance":null}},"created_at":"2018-09-05T14:02:06.000Z","updated_at":"2025-07-08T11:50:21.000Z","dependencies_parsed_at":"2023-02-10T19:01:28.665Z","dependency_job_id":"16a41fda-b759-46d3-8e2e-51a6077c1424","html_url":"https://github.com/thoth-station/thamos","commit_stats":{"total_commits":987,"total_committers":22,"mean_commits":44.86363636363637,"dds":0.8186423505572442,"last_synced_commit":"234351025c77cfe28b0df07f7ee017469b57d3f4"},"previous_names":[],"tags_count":104,"template":false,"template_full_name":null,"purl":"pkg:github/thoth-station/thamos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fthamos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fthamos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fthamos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fthamos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoth-station","download_url":"https://codeload.github.com/thoth-station/thamos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoth-station%2Fthamos/sbom","scorecard":{"id":883032,"data":{"date":"2025-08-11","repo":{"name":"github.com/thoth-station/thamos","commit":"602a343cd8ce986f476db4001f8e7bfc128e0539"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":9,"reason":"Found 13/14 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"43 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2023-120 / GHSA-45c4-8wx5-qw6w","Warn: Project is vulnerable to: PYSEC-2024-24 / GHSA-5h86-8mv2-jq9f","Warn: Project is vulnerable to: GHSA-5m98-qgg9-wh84","Warn: Project is vulnerable to: GHSA-7gpw-8wmc-pm8g","Warn: Project is vulnerable to: GHSA-8495-4g3g-x7pr","Warn: Project is vulnerable to: PYSEC-2024-26 / GHSA-8qpw-xqxj-h4r2","Warn: Project is vulnerable to: GHSA-9548-qrrj-x5pj","Warn: Project is vulnerable to: PYSEC-2023-246 / GHSA-gfw2-4jvh-wgfg","Warn: Project is vulnerable to: GHSA-pjjw-qhg8-p2p9","Warn: Project is vulnerable to: PYSEC-2023-250 / GHSA-q3qx-c6g2-7pw2","Warn: Project is vulnerable to: PYSEC-2023-251 / GHSA-qvrw-v9rv-5rjx","Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2023-23 / GHSA-jrwr-5x3p-hvc3","Warn: Project is vulnerable to: PYSEC-2023-24 / GHSA-vrjv-mxr7-vjf8","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-g92j-qhmh-64v2","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2018-49 / GHSA-rprw-h62v-c2w7","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg","Warn: Project is vulnerable to: PYSEC-2023-207 / GHSA-gwvm-45gx-3cf8","Warn: Project is vulnerable to: PYSEC-2019-133 / GHSA-mh33-7rrq-662w","Warn: Project is vulnerable to: PYSEC-2019-132 / GHSA-r64q-w8jr-g9qp","Warn: Project is vulnerable to: PYSEC-2020-148 / GHSA-wqvq-5m8c-6g24","Warn: Project is vulnerable to: PYSEC-2018-32 / GHSA-www2-v7xj-xrc6","Warn: Project is vulnerable to: PYSEC-2021-108"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T08:57:00.014Z","repository_id":37962459,"created_at":"2025-08-24T08:57:00.014Z","updated_at":"2025-08-24T08:57:00.014Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29873651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T21:05:00.265Z","status":"ssl_error","status_checked_at":"2026-02-26T20:57:13.669Z","response_time":89,"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":["artificial-intelligence","commandline","hacktoberfest","thoth"],"created_at":"2024-12-08T03:08:05.115Z","updated_at":"2026-02-26T21:46:19.636Z","avatar_url":"https://github.com/thoth-station.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Thamos\n------\n\n.. image:: https://img.shields.io/github/v/tag/thoth-station/thamos?style=plastic\n  :target: https://github.com/thoth-station/thamos/releases\n  :alt: GitHub tag (latest by date)\n\n.. image:: https://img.shields.io/pypi/v/thamos?style=plastic\n  :target: https://pypi.org/project/thamos\n  :alt: PyPI - Module Version\n\n.. image:: https://img.shields.io/pypi/l/thamos?style=plastic\n  :target: https://pypi.org/project/thamos\n  :alt: PyPI - License\n\n.. image:: https://img.shields.io/pypi/dm/thamos?style=plastic\n  :target: https://pypi.org/project/thamos\n  :alt: PyPI - Downloads\n\n\nA CLI tool and library for communicating with Thoth backend.\n\nUsing Thamos as a CLI tool\n==========================\n\nThamos is released on `PyPI \u003chttps://pypi.org/project/thamos\u003e`_. See\ninstallation instructions bellow to setup Thoth/Thamos for your repository:\n\n.. code-block:: console\n\n  # Install Thamos CLI tool:\n  $ pip3 install thamos  # keep in mind: requires Python 3.6+!!\n  # Go to repository that should be managed by Thoth which already has Pipfile present:\n  $ cd ~/git/repo/\n  # Setup Thamos configuration:\n  $ thamos config\n  # Add packages.\n  $ thamos add tensorflow\n  # Ask Thoth for software stack recommendations:\n  $ thamos advise\n  # Install packages:\n  $ thamos install  # can be merged using `thamos advise --install`\n  # Retrieve logs of the last analysis:\n  $ thamos log\n\n\nAs Thamos notes analysis ids for better UX of ``thamos log``, it's recommended to\nadd ``.thoth_last_analysis_id`` file to ``.gitignore``. Adding also ``.venv``\nmight be useful if virtual environment management is turned on.\n\nSee `thoth-station/cli-examples \u003chttps://github.com/thoth-station/cli-examples\u003e`__\nrepository with examples.\n\nRecommendation types\n====================\n\nSee `this document \u003chttps://thoth-station.ninja/recommendation-types/\u003e`__ for a\ndetailed info on the recommendation types Thoth provides.\n\nAdjusting configuration based on environment variables\n======================================================\n\nYou can adjust content of configuration file each time Thamos CLI or Thamos\nlibrary loads it by expanding entries with environment variables. This can be\nhandy if you would like to parameterize some of the options at\nruntime (e.g. in deployment).\n\nThis behaviour is (due to security reasons) explicitly turned off by default.\nHowever you can turn it on by setting ``THAMOS_CONFIG_EXPAND_ENV`` environment\nvariable to ``1`` (``0`` explicitly turns this behaviour off, default value):\n\n\n.. code-block:: console\n\n    THOTH_HOST=test.thoth-station.ninja THAMOS_CONFIG_EXPAND_ENV=1 thamos advise\n    2019-03-13 11:22:59,562 [18639] INFO     thamos.config: Expanding configuration file based on environment variables\n\nEntries which should be expanded have environment variables in curly braces\nlike the following example:\n\n.. code-block:: yaml\n\n   host: {THOTH_HOST}\n\n\nNote the expansion is done by replacing these values directly with values of\nenvironment variable, this means types need to be taken into account\n(environment variable with value ``\"true\"`` is put into configuration file as\n``true``).\n\n\nUsing custom configuration file template\n========================================\n\nYou can use your own custom configuration file as a template. This is\nespecially useful if you want to have some configuration entries constant and\nlet expand only some of the configuration options. In other words, you can\nparametrize configuration file.\n\nAn example of configuration file template can be:\n\n.. code-block:: yaml\n\n  host: {THOTH_SERVICE_HOST}\n  tls_verify: true\n  requirements_format: {requirements_format}\n\n  runtime_environments:\n    - name: '{runtime_environment_name}'\n      operating_system:\n        name: {os_name}\n        version: '{os_version}'\n      labels:\n        foo: bar\n        key: value\n      hardware:\n        cpu_family: {cpu_family}\n        cpu_model: {cpu_model}\n        gpu_model: {gpu_model}\n      python_version: '{python_version}'\n      cuda_version: {cuda_version}\n      recommendation_type: stable\n      platform: '{platform}'\n\nThen, you need to supply this configuration file to the following command:\n\n.. code-block:: console\n\n  thamos config --template template.yaml\n\nListing of automatically expanded configuration options which are supplied the\nconfig sub-command (these options are optional and will be expanded based on HW\nor SW discovery):\n\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| Configuration option        | Explanation                    |  Example                                          |\n+=============================+================================+===================================================+\n| `runtime_environment_name`  | name of operating system       |  fedora-35                                        |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `os_name`                   | name of operating system       |  fedora                                           |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `os_version`                | version of operating system    |  35                                               |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `cpu_family`                | CPU family identifier          |  6                                                |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `cpu_model`                 | CPU model identifier           |  94                                               |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `python_version`            | Python version (major.minor)   |  3.10                                             |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `cuda_version`              | CUDA version (major.minor)     |  11.1                                             |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `platform`                  | Platform used.                 |  linux-x86_64                                     |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `requirements_format`       | Requirements format.           |  pipenv                                           |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n| `base_image`                | Thoth base image used.         |  quay.io/thoth-station/s2i-thoth-ubi8-py36:v1.0.0 |\n+-----------------------------+--------------------------------+---------------------------------------------------+\n\nPlatform corresponds to ``sysconfig.get_platform()`` call.\n\nThese configuration options are optional and can be mixed with adjustment based\non environment variables (see ``THOTH_SERVICE_HOST`` example above). Note the\nenvironment variables are not expanded on `thamos config` call but rather on\nother sub-commands issued (e.g. ``thamos advise`` or others).\n\nThe output format coming out of recommendations can be compatible with\n`Pipenv \u003chttps://pipenv.kennethreitz.org/en/latest/\u003e`__,\n`raw pip \u003chttps://pip.pypa.io/en/stable/user_guide/\u003e`__  or similar to the one\nprovided by `pip-tools \u003chttps://pypi.org/project/pip-tools/\u003e`__ (actually same as for\n``pip`` as these formats are interchangeable). The format is configured using\n``requirements_format`` configuration option, available options are:\n\n* ``requirements_format: pipenv`` for `Pipenv \u003chttps://pipenv.kennethreitz.org/en/latest/\u003e`__ compatible output\n* ``requirements_format: pip`` or ``requirements_format: pip-tools`` for `pip \u003chttps://pip.pypa.io/en/stable/user_guide/\u003e`__ or `pip-tools \u003chttps://pypi.org/project/pip-tools/\u003e`__ compatible output\n\nLabels\n======\n\nIt is possible to label requests for user-specific needs. In such a case,\nresolver will include pipeline units that match labels with the ones provided\non the request.\n\nAn example can be a CI system that is asking for an advise and labels the\nrequest with ``requester=ci_foo;team=thoth``. In such a case, the resolution\nengine includes pipeline units that are specific to the CI system and the team\nspecified (besides the ones that are added by default). Labels can be specified\nin the ``.thoth.yaml`` configuration file or using CLI (labels passed via CLI\ntake precedence):\n\n.. code-block:: console\n\n  thamos advise --labels requester=ci_foo;team=thoth\n\nSee the following `demo for more information\n\u003chttps://www.youtube.com/watch?v=eoJIfQip_6M\u003e`__.\n\nSupport for multiple runtime environments\n=========================================\n\nThoth performs recommendations based on your hardware and software environment,\nso called runtime environments. You can specify more than just one runtime\nenvironment that should be targetted during recommendations. This might be\nsuitable if you would like to tweak some runtime environment specific\nconfiguration options. An example could be a deployment of a machine learning\nmodel to the cluster that uses CUDA, but you do not run CUDA locally (fast\niterative development locally, subsequently training a model in the cluster on\na large dataset). In such cases, you can specify two configuration entries in\n``.thoth.yaml`` file:\n\n.. code-block:: yaml\n\n  host: {THOTH_SERVICE_HOST}\n  tls_verify: true\n  requirements_format: pipenv\n\n  runtime_environments:\n    - name: 'cuda'  # \u003c\u003c\u003c\n      operating_system:\n        name: fedora\n        version: '32'\n      hardware:\n        cpu_family: 6\n        cpu_model: 94\n        gpu_model: 'GeForce GTX 680'\n      python_version: '3.8'\n      # \u003c\u003c\u003c HERE\n      cuda_version: '10.1'  # \u003c\u003c\u003c\n      # \u003c\u003c\u003c HERE\n      recommendation_type: stable\n      platform: 'linux-x86_64'\n      openblas_version: '0.3.13'\n      openmpi_version: '4.1'\n      cudnn_version: '8'\n      mkl_version: '2021.1.1'\n      base_image: 'quay.io/thoth-station/s2i-thoth-ubi8-py36-mkl:v0.23.0'\n\n    - name: 'no_cuda'  # \u003c\u003c\u003c\n      operating_system:\n        name: fedora\n        version: '32'\n      hardware:\n        cpu_family: 6\n        cpu_model: 94\n        gpu_model: null\n      python_version: '3.8'\n      # \u003c\u003c\u003c HERE\n      cuda_version: null  # \u003c\u003c\u003c\n      # \u003c\u003c\u003c HERE\n      recommendation_type: stable\n      platform: 'linux-x86_64'\n      openblas_version: '0.3.13'\n      openmpi_version: '4.1'\n      cudnn_version: null\n      mkl_version: '2021.1.1'\n      base_image: 'quay.io/thoth-station/s2i-thoth-ubi8-py36:v0.23.0'\n\n\nThe two runtime environments stated in the ``.thoth.yaml`` differ in\n``cuda_version`` configuration and their names.\n\nTo trigger advises for runtime environment named ``cuda``, issue:\n\n.. code-block:: console\n\n  thamos advise --runtime-environment cuda\n\nTo target the latter runtime environment named ``no_coda``, you can issue:\n\n.. code-block:: console\n\n  thamos advise --runtime-environment no_cuda\n\nThis option can be also supplied via environment variable using\n``THAMOS_RUNTIME_ENVIRONMENT=no_cuda``.\n\nIf the runtime environment is not provided explictly, Thamos will take the\nfirst runtime environment entry stated in the ``runtime_environment`` listing.\nFor the example showed above it will default to ``cuda`` environment:\n\n.. code-block:: console\n\n  # defaults to the first one - \"cuda\"\n  thamos advise\n\nMultiple runtime environments can be used in conjunction with the automatically\nexpanded configuration options and configuration file templating naturally.\n\nBy default, all the files produced during advises are stored in the project\nroot directory. To maintain multiple lock files specific for runtime\nenvironments, it is possible to configure \"overlays\" directory in Thamos\nconfiguration file.\n\nListing available environments and container images\n===================================================\n\nTo list available environments for which the resolver can resolve dependencies,\nissue:\n\n.. code-block:: console\n\n  thamos environments\n\nEach entry states configuration of operating system, its version and Python\ninterpreter version that can be configured in each runtime environment section\nin ``.thoth.yaml``.\n\nIf you wish to list available container images ready to be used:\n\n.. code-block:: console\n\n  thamos images\n\nEach entry stated can be set as a ``base_image`` in ``.thoth.yaml`` in the\nrespective runtime environment section and used as a base for running the\nPython applications.\n\nOverlays directory\n==================\n\nMultiple directories carrying requirement files can be configured using\n``overlays_dir`` configuration option in ``.thoth.yaml`` file. This\nconfiguration is configured on a global scope and all the runtime environments\ninherit path from it.\n\nAn example configuration file states ``overlays_dir``:\n\n.. code-block:: yaml\n\n  host: {THOTH_SERVICE_HOST}\n  tls_verify: true\n  requirements_format: pipenv\n  overlays_dir: overlays\n\n  runtime_environments:\n    - name: 'fedora-33'\n      operating_system:\n        name: fedora\n        version: '33'\n      python_version: '3.8'\n\n    - name: 'ubi-8'\n      operating_system:\n        name: rhel\n        version: '8'\n      python_version: '3.8'\n\nIn such case, the directrory structure respecting the configuration supplied\nshould be:\n\n.. code-block:: console\n\n  .\n  ├── app.py\n  ├── overlays\n  │   ├── fedora-33\n  │   │   ├── Pipfile\n  │   │   ├── Pipfile.lock\n  │   │   ├── .env\n  │   │   └── constraints.txt\n  │   └── ubi-8\n  │   │   ├── Pipfile\n  │   │   ├── Pipfile.lock\n  │   │   ├── .env\n  │   │   └── constraints.txt\n  └── .thoth.yaml\n\nEach directory in the ``overlays`` directory should respect the runtime\nenvironment name stated in ``.thoth.yaml`` file and carries files specific for\nthe given runtime environment.\n\nSimilarly as for Pipenv files, requirement files respecting `pip-tools\n\u003chttps://pypi.org/project/pip-tools\u003e`__ can be used (``requirements.in`` and\n``requirements.txt``).\n\n`Constraints files\n\u003chttps://thoth-station.ninja/docs/developers/adviser/experimental_features.html#constaints-files\u003e`__\n(``constraints.txt``) are optional.\n\nOptionally, users can provide ``.env`` file that can state environment\nvariables that should be passed to the process when ``thamos run`` is executed.\nThe ``.env`` file states each environment variable on a single line in a form\nof ``ENV_NAME=VALUE``. Optionally, lines can be commented out with hash\n(``#``).  An example of the file content:\n\n.. code-block::\n\n  # This is an example .env file.\n  FOO=bar\n  ANOTHER_FOO=another_bar\n\nEach ``.env`` file can be specified per overlay. If no overlay directories are\nused, ``.env`` file can be placed in the top level project directory (the\ndirectory where ``.thoth.yaml`` is present).\n\nInstalling requirements\n=======================\n\nOnce a lock file is resolved after calling ``thamos advise``, the application stack\ncan be installed by using ``thamos install`` command. If you wish to pass additional\noptions that should be used by ``pip``, you can do so by passing them after ``--``.\n\nAn example could be installing packages in a corporate network where packages should\nbe installed through a proxy tunnel:\n\n.. code-block:: console\n\n  thamos install -- --proxy socks5h://127.0.0.1:8029 --trusted-host pypi.org\n\nAdvise report structure\n=======================\n\nThe structure of the advise report in JSON format produced with the ``thamos advise --json`` command is available in the `Thoth API advise endpoint\n\u003chttps://khemenu.thoth-station.ninja/api/v1/ui/#/Advise/get_advise_python\u003e`_ to retrieve advise results and in the corresponding `schema specification\n\u003chttps://github.com/thoth-station/user-api/blob/d81a54236f7dfe55d138ed1fe236eaf097a53d9a/openapi/openapi.yaml#L2741\u003e`_ for this endpoint.\n\nUsing Thoth and thamos in OpenShift's s2i\n=========================================\n\nUsing configuration templates is especially useful for OpenShift builds where\nyou can specify your template in an s2i repository (omit ``Pipfile.lock`` to\nenable call to ``thamos advise`` as shown in `this repository\n\u003chttps://github.com/thoth-station/s2i-example-tensorflow\u003e`_).\n\nThen, you need to provide following environment variables:\n\n* ``THAMOS_CONFIG_TEMPLATE`` - holds path to template - use ``/tmp/src`` prefix to point to root of s2i repository (e.g. ``/tmp/src/template.yaml`` if ``template.yaml`` is the configuration template and is stored in root of your Git repository).\n* ``THAMOS_NO_INTERACTIVE`` - set to `1` if you don't want to omit interactive thamos (suitable for automated s2i builds happening in the cluster).\n* ``THAMOS_NO_PROGRESSBAR`` - set to `1` to disable progressbar while waiting for response from Thoth backend - it can cause annoying too verbose output printed to OpenShift console during the build.\n* ``THAMOS_CONFIG_EXPAND_ENV`` - set to `1` to enable expansion based on environment variables when generating ``.thoth.yaml`` file - this needs to be explicitly turned on due to possible security implications.\n* ``THAMOS_FORCE`` - set to `1` not use cached results, always force analysis on Thoth's side (note this option can be ignored by a Thoth operator based on deployment configuration).\n* ``THAMOS_VERBOSE`` - set to `1` to run thamos in verbose mode to show what's going on (verbosity on client side).\n* ``THAMOS_DEBUG`` - set to `1` to run analyzes (adviser, provenance checker, ...) on Thoth's backend side in debug mode, you can obtain logs by running ``thamos logs`` or directly on Thoth's user API; the analysis id gets printed into the console during the build process in OpenShift (verbosity on server side).\n* ``THAMOS_DEV`` - set to `1` to consider also development dependencies, this flag defaults to `0` - by enabling development dependencies, adviser will need to browse larger space of software stacks possibly ending with a worse software stack advised (development dependencies are usually not used during application deployment)\n* ``THAMOS_DISABLE_CUDA`` - set to `1` to disable CUDA detection\n* ``THAMOS_NO_EMOJI`` - set to `1` to disable UTF-8 emojis (useful for dummy terminals)\n* ``THAMOS_NO_USER_STACK`` - set to `1` to disable sending lock file present in the directory - this lock file is used as a base when searching a better lock file for user needs\n* ``THAMOS_RETRY_ON_ERROR_COUNT`` - number of retries performed if the API server is responding with an error HTTP status (defaults to 3), this option is not usually needed to be adjusted\n* ``THAMOS_RETRY_ON_ERROR_SLEEP`` - sleep time when an error on the API server is spotted (see ``THAMOS_RETRY_ON_ERROR_COUNT``), defaults to 3 seconds\n* ``THAMOS_NO_PROGRESSBAR`` - disable progress bar visualization, useful for dummy terminals\n* ``THAMOS_TIMEOUT`` - timeout period in seconds after which Thamos stops trying to fetch results\n* ``THAMOS_DISABLE_LAST_ANALYSIS_ID_FILE`` - set to `1`  if you do not want to create a file that states last analysis id (used not to memorize the last analysis id across commands)\n* ``THAMOS_REQUIREMENTS_FORMAT`` - style of requirements used for managing dependencies - one of ``pip``, ``pip-tools``, ``pipenv``, defaults to ``pipenv`` if not specified\n* ``THAMOS_TOKEN`` - token used for authenticated requests to the backend\n\nSee `OpenShift s2i documentation\n\u003chttps://docs.openshift.com/container-platform/3.9/dev_guide/builds/advanced_build_operations.html#dev-guide-assigning-builds-to-nodes\u003e`_\non how to pin build to a specific node in the cluster. This is needed if you\nwould like to perform automatic hardware discovery to get optimized stacks on\nyour hardware.\n\nUsing Thamos as a library\n=========================\n\n\n.. code-block:: python\n\n   from thamos.lib import image_analysis\n   from thamos.config import config\n\n   # Set global context.\n   # Host to Thoth's User API. API discovery will be done\n   # transparently and the most appropriate API version will be used.\n   config.explicit_host = \"khemenu.thoth-station.ninja\"\n   # TLS verification when communicating with Thoth API.\n   config.tls_verify = True\n\n   image_analysis(\n     image=\"registry.redhat.com/fedora:29\",\n     registry_user=\"fridex\",\n     registry_password=\"secret!\",\n     # TLS verification when communicating with registry.\n     verify_tls=True,\n     nowait=False\n   )\n\nDisabling TLS related warnings\n==============================\n\nIf you communicate with Thoth's user API without TLS (you have set the\n``tls_verify`` configuration option to ``false`` in the ``.thoth.yaml`` file),\nThamos CLI and Thamos library issue a warning each time there is done\ncommunication with the API server. To suppress this warning, set the\n``THAMOS_DISABLE_TLS_WARNING`` environment variable to a non-zero value:\n\n.. code-block:: console\n\n  $ export THAMOS_DISABLE_TLS_WARNING=1\n  $ thamos advise\n\nAutogenerated client from OpenAPI\n=================================\n\nMost parts of Thamos consist of automatic generated code. You can update Thamos\nby running the following command:\n\n.. code-block:: console\n\n  $ ./swagger-codegen.sh\n\nThe command above will download and run automatic code generation tool against\nthe most recent OpenAPI specification of `User API\n\u003chttps://github.com/thoth-station/user-api/\u003e`_. Results of the tool are\nautomatically placed into this repository in `thamos/swagger_client/` and\n`Documentation/`. They consist of automatically generated code as well as\n`documentation on how to use the code\n\u003chttps://github.com/thoth-station/thamos/tree/master/Documentation\u003e`_.  Thamos\nitself provides routines built on top of this automated generated code to\nsimplify usage in ``thamos/lib``.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoth-station%2Fthamos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoth-station%2Fthamos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoth-station%2Fthamos/lists"}