mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-03-31 00:53:38 +00:00
Compare commits
4 Commits
dependabot
...
sprt/env-n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d78c170a55 | ||
|
|
8117f4e998 | ||
|
|
2728b493d5 | ||
|
|
5765bc97b4 |
2
.github/workflows/actionlint.yaml
vendored
2
.github/workflows/actionlint.yaml
vendored
@@ -23,3 +23,5 @@ jobs:
|
||||
|
||||
- name: Run actionlint
|
||||
uses: raven-actions/actionlint@e01d1ea33dd6a5ed517d95b4c0c357560ac6f518 # v2.1.1
|
||||
with:
|
||||
version: '1.7.11'
|
||||
|
||||
4
.github/workflows/cleanup-resources.yaml
vendored
4
.github/workflows/cleanup-resources.yaml
vendored
@@ -12,7 +12,9 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
id-token: write # Used for OIDC access to log into Azure
|
||||
environment: ci
|
||||
environment:
|
||||
name: ci
|
||||
deployment: false
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
|
||||
4
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
4
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
@@ -58,7 +58,9 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # Used for OIDC access to log into Azure
|
||||
environment: ci
|
||||
environment:
|
||||
name: ci
|
||||
deployment: false
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
|
||||
@@ -55,7 +55,9 @@ jobs:
|
||||
permissions:
|
||||
|
||||
id-token: write # Used for OIDC access to log into Azure
|
||||
environment: ci
|
||||
environment:
|
||||
name: ci
|
||||
deployment: false
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
|
||||
12
.github/workflows/run-kata-coco-tests.yaml
vendored
12
.github/workflows/run-kata-coco-tests.yaml
vendored
@@ -144,7 +144,9 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: read
|
||||
environment: ci
|
||||
environment:
|
||||
name: ci
|
||||
deployment: false
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
@@ -269,7 +271,9 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: read
|
||||
environment: ci
|
||||
environment:
|
||||
name: ci
|
||||
deployment: false
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
@@ -379,7 +383,9 @@ jobs:
|
||||
pull-type:
|
||||
- default
|
||||
runs-on: ubuntu-24.04
|
||||
environment: ci
|
||||
environment:
|
||||
name: ci
|
||||
deployment: false
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
|
||||
@@ -48,7 +48,9 @@ jobs:
|
||||
- host_os: cbl-mariner
|
||||
vmm: clh
|
||||
runs-on: ubuntu-22.04
|
||||
environment: ci
|
||||
environment:
|
||||
name: ci
|
||||
deployment: false
|
||||
permissions:
|
||||
id-token: write # Used for OIDC access to log into Azure
|
||||
env:
|
||||
|
||||
@@ -272,12 +272,29 @@ kbs_uninstall_cli() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Ensure ~/.cicd/venv exists and activate it in the current shell.
|
||||
ensure_cicd_python_venv() {
|
||||
local venv_path="${HOME}/.cicd/venv"
|
||||
if [[ ! -f "${venv_path}/bin/activate" ]]; then
|
||||
# NIM tests need Python 3.10 via pyenv; attestation uses system python3. Both are fine.
|
||||
if command -v pyenv &>/dev/null; then
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
[[ -d "${PYENV_ROOT}/bin" ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
|
||||
eval "$(pyenv init - bash)"
|
||||
fi
|
||||
mkdir -p "${HOME}/.cicd"
|
||||
python3 -m venv "${venv_path}"
|
||||
fi
|
||||
# shellcheck disable=SC1091
|
||||
source "${venv_path}/bin/activate"
|
||||
}
|
||||
|
||||
# Ensure the sev-snp-measure utility is installed.
|
||||
#
|
||||
ensure_sev_snp_measure() {
|
||||
command -v sev-snp-measure >/dev/null && return
|
||||
|
||||
source "${HOME}"/.cicd/venv/bin/activate
|
||||
ensure_cicd_python_venv
|
||||
pip install sev-snp-measure
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,7 @@ NGC_API_KEY_SEALED_SECRET_EMBEDQA_BASE64=$(echo -n "${NGC_API_KEY_SEALED_SECRET_
|
||||
export NGC_API_KEY_SEALED_SECRET_EMBEDQA_BASE64
|
||||
|
||||
setup_langchain_flow() {
|
||||
# shellcheck disable=SC1091 # Sourcing virtual environment activation script
|
||||
source "${HOME}"/.cicd/venv/bin/activate
|
||||
ensure_cicd_python_venv
|
||||
|
||||
pip install --upgrade pip
|
||||
[[ "$(pip show langchain 2>/dev/null | awk '/^Version:/{print $2}')" = "0.2.5" ]] || pip install langchain==0.2.5
|
||||
@@ -177,13 +176,6 @@ setup_file() {
|
||||
|
||||
dpkg -s jq >/dev/null 2>&1 || sudo apt -y install jq
|
||||
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
|
||||
eval "$(pyenv init - bash)"
|
||||
|
||||
# shellcheck disable=SC1091 # Virtual environment will be created during test execution
|
||||
python3 -m venv "${HOME}"/.cicd/venv
|
||||
|
||||
setup_langchain_flow
|
||||
|
||||
policy_settings_dir="$(create_tmp_policy_settings_dir "${pod_config_dir}")"
|
||||
@@ -262,8 +254,6 @@ setup_file() {
|
||||
QUESTION="What is the capital of France?"
|
||||
ANSWER="The capital of France is Paris."
|
||||
|
||||
# shellcheck disable=SC1091 # Sourcing virtual environment activation script
|
||||
source "${HOME}"/.cicd/venv/bin/activate
|
||||
# shellcheck disable=SC2031 # Variables are used in heredoc, not subshell
|
||||
cat <<EOF >"${HOME}"/.cicd/venv/langchain_nim.py
|
||||
from langchain_nvidia_ai_endpoints import ChatNVIDIA
|
||||
@@ -295,8 +285,6 @@ EOF
|
||||
# shellcheck disable=SC2031 # Variables are shared via file between BATS tests
|
||||
[[ -n "${MODEL_NAME}" ]]
|
||||
|
||||
# shellcheck disable=SC1091 # Sourcing virtual environment activation script
|
||||
source "${HOME}"/.cicd/venv/bin/activate
|
||||
cat <<EOF >"${HOME}"/.cicd/venv/langchain_nim_kata_rag.py
|
||||
import os
|
||||
from langchain.chains import ConversationalRetrievalChain, LLMChain
|
||||
|
||||
Reference in New Issue
Block a user