Skip to main content

Command line interface to manage InferenceServices in KServe managed by DIALS.

Project description

dismcli

DIALS InfenceService Manager or simply dism is a program to deploy/remove InferenceServices in KServe managed by DIALS.

Local development

Install the dependencies and the package using uv:

uv sync --all-groups
uv pip install -e .
uv run pre-commit install

Tests

Run tests with pytest:

uv run pytest tests/ --cov=dismcli --cov-report=xml --cov-report=term

Tox

You may also want to run the tests with tox to test against multiple python versions:

uv run tox

asdf users

tox requires multiple versions of Python to be installed. Using asdf, you have multiple versions installed, but they aren’t normally exposed to the current shell. You can use the following command to expose multiple versions of Python in the current directory:

asdf set python 3.12.9 3.11.10 3.10.13

This will use 3.12.9 by default (if you just run python), but it will also put python3.11 and python3.10 symlinks in your PATH so you can run those too (which is exactly what tox is looking for).

GitLab CI Setup for dism-cli

This document describes the steps taken to configure GitLab CI for the dism-cli repository so it can access the private repository dism-core via SSH during pipeline execution.

Purpose

The dism-cli project depends on the dism-core repository using a Git+SSH link specified in pyproject.toml:

[tool.uv.sources]
dism-core = { git = "ssh://git@gitlab.cern.ch:7999/cms-dqmdc/libraries/dism-core.git", rev = "v1.0.0" }

To allow GitLab CI in dism-cli to clone dism-core, we need to set up SSH access.


Steps

1. Generate SSH Key Pair

Generate a new SSH key pair (without a passphrase) for CI access:

ssh-keygen -t ed25519 -f ci_key -N "" -C "dism-cli-ci-access"
  • This creates:
    • ci_key (private key)
    • ci_key.pub (public key)

2. Add Deploy Key to dism-core

  • Go to the dism-core project on GitLab.
  • Navigate to: Settings > Repository > Deploy Keys
  • Add a new key:
    • Title: dism-cli-ci-access
    • Key: paste the contents of ci_key.pub

3. Add CI/CD Variable to dism-cli

To securely provide the private key to GitLab CI:

  1. Convert the private key to a base64 string:

    base64 -w0 ci_key > ci_key.b64
    
  2. Copy the content of ci_key.b64.

  3. Go to the dism-cli project on GitLab.

  4. Navigate to: Settings > CI/CD > Variables

  5. Add a new variable:

    • Key: CI_SSH_PRIVATE_KEY_B64
    • Value: paste the content from ci_key.b64
    • Type: Variable
    • Masked and Hidden:

With this setup, the GitLab CI runner in dism-cli can authenticate with dism-core via SSH, allowing it to fetch dependencies during the test stage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmsdism-0.3.3.tar.gz (748.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmsdism-0.3.3-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file cmsdism-0.3.3.tar.gz.

File metadata

  • Download URL: cmsdism-0.3.3.tar.gz
  • Upload date:
  • Size: 748.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for cmsdism-0.3.3.tar.gz
Algorithm Hash digest
SHA256 fd42b372b7debdb8be83f3d98bed36989359d2565720bd708ee07a3b584114d6
MD5 1bfdcfbc42b1edd0a0895f9d4bbc69e0
BLAKE2b-256 67a8b82129c5d92c52e01017d4a056ecc475e8fefee6f3f723f17a56451f4db5

See more details on using hashes here.

File details

Details for the file cmsdism-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: cmsdism-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for cmsdism-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9d0f4844414fae777008db68ecadb2ab7f661a97a0bc4d2921e63f03912c9d79
MD5 b4c64592c6af643d8707644ab783d998
BLAKE2b-256 d3c523434e3501c98393721f8c1b54bbbcc6ecfe75d0ea045f4fe53ad1da0383

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page