Guide de l'utilisateur des modèles Gemma avec Ollama sur GDC sous air gap

Ce document fournit des instructions détaillées pour déployer des modèles de pondération ouverts de Google DeepMind, en particulier la famille Gemma 4, à l'aide d'Ollama dans des environnements Google Distributed Cloud (GDC) air-gapped. Il explique comment utiliser Ollama pour simplifier la diffusion, en exploitant les fonctionnalités de la plate-forme GDC, y compris Kubernetes, Harbor et les ressources GPU. Sélectionnez le modèle et l'option GPU dans la section "Modèle". Toutes les autres étapes sont identiques pour tous les modèles.

Modèles compatibles

Modèle Tag Ollama Paramètres Licence Options de GPU
Gemma 4 E2B gemma4:e2b 5,1 milliards (2 milliards effectifs) Conditions d'utilisation de Gemma 1 GPU (n'importe lequel)
Gemma 4 E4B gemma4:e4b 8 milliards (4 milliards effectifs) Conditions d'utilisation de Gemma 1 GPU (n'importe lequel)
Gemma 4 12B gemma4:12b 12B (dense) Conditions d'utilisation de Gemma 1 GPU (n'importe lequel)
Gemma 4 26B-A4B gemma4:26b 25,8 milliards au total/4 milliards actifs (Mixture of Experts) Conditions d'utilisation de Gemma 1 GPU (n'importe lequel)
Gemma 4 31B gemma4:31b 31,3 milliards (dense) Conditions d'utilisation de Gemma 1 GPU (n'importe lequel)

Architecture

La solution consiste à déployer Ollama en tant que backend de diffusion conteneurisé (Deployment) dans un cluster standard. Les pondérations du modèle sont stockées sur des volumes persistants, renseignés à partir de fichiers téléchargés localement et importés à l'aide d'un pod de chargement. Un Service Kubernetes de type LoadBalancer expose l'API backend, et les objets NetworkPolicy / ProjectNetworkPolicy sécurisent l'accès à celle-ci.

Avant de commencer

Suivez l'implémentation de référence des modèles Open Weights avec Ollama sur le poste de travail et assurez-vous d'avoir accès au répertoire ${HOME}/gdcag-solutions.

Identity and Access Management

Ce guide part du principe que vous disposez des rôles suivants sur le cluster standard :

  • Facultatif : Administrateur de cluster standard (afficher les clusters depuis la console)
  • Administrateur de cluster standard (standard-cluster-admin)
  • StandardClusterRoleBinding au StandardClusterRole cluster-admin (créé par un administrateur de projet IAM, consultez la section Identity and Access Management de l'implémentation de référence)

Station de travail

Sauf indication contraire, exécutez toutes les commandes de ce guide à partir d'un poste de travail disposant des outils requis et d'une connectivité à l'environnement et à Internet.

La configuration de l'environnement est divisée en plusieurs couches :

  • ${HOME}/gdcag-solutions/env.sh charge les paramètres de la plate-forme et du registre.
  • ${HOME}/gdcag-solutions/open-weight-models/ollama/env.sh ajoute les paramètres Ollama.

  • Ce guide de l'utilisateur ajoute env.d/model.sh (le modèle) et env.d/accelerator.sh (l'option de GPU et les paramètres d'exécution), que vous écrivez dans la section "Modèle", ainsi que env.d/model-common.sh (les valeurs qui en découlent).

  1. Créez la structure de répertoires du guide de l'utilisateur :

    mkdir -p ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d
    
  2. Créez le fichier de configuration de l'environnement du modèle commun. Il calcule les noms et les chemins d'accès dérivés du nom du modèle :

    cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/model-common.sh && echo "Successfully created." || echo "Failed to create!"
    # Model (derived from env.d/model.sh)
    export GDCS_OLLAMA_MODEL_LOWERCASE="${GDCS_OLLAMA_MODEL,,}"
    export GDCS_OLLAMA_MODEL_KUBERNETES="$(echo "${GDCS_OLLAMA_MODEL_LOWERCASE}" | tr ':' '-')"
    
    # Paths
    export GDCS_OLLAMA_MODEL_DOWNLOAD_DIR="${GDCS_USER_GUIDE_HOME}/models/${GDCS_OLLAMA_MODEL_LOWERCASE}"
    export GDCS_OLLAMA_PV_MOUNT_PATH="/root/.ollama/models"
    
    # Workload
    export GDCS_WORKLOAD_NAMESPACE="ollama-gemma"
    export GDCS_WORKLOAD_NAME="${GDCS_OLLAMA_MODEL_KUBERNETES}"
    export GDCS_MODEL_LOADER_POD_NAME="loader-${GDCS_OLLAMA_MODEL_KUBERNETES}"
    EOF
    
  3. Créez le fichier de chargement de l'environnement du guide de l'utilisateur. Il source l'environnement racine, l'environnement d'implémentation et l'environnement du modèle :

    cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.sh && echo "Successfully created." || echo "Failed to create!"
    source "${HOME}/gdcag-solutions/open-weight-models/ollama/env.sh"
    
    export GDCS_USER_GUIDE_HOME="${HOME}/gdcag-solutions/open-weight-models/ollama/gemma"
    echo "GDCS_USER_GUIDE_HOME=${GDCS_USER_GUIDE_HOME}"
    
    # Sourced in dependency order: the model selection, the accelerator and runtime settings, then the values derived from them
    source "${GDCS_USER_GUIDE_HOME}/env.d/model.sh"
    source "${GDCS_USER_GUIDE_HOME}/env.d/accelerator.sh"
    source "${GDCS_USER_GUIDE_HOME}/env.d/model-common.sh"
    EOF
    

Modèle

Chaque onglet liste les informations sur le modèle, la commande qui écrit le fichier d'environnement du modèle env.d/model.sh, et les onglets imbriqués qui écrivent le fichier d'environnement de l'accélérateur env.d/accelerator.sh pour l'option de GPU choisie avec des types de ressources et des paramètres Ollama préremplis. Pour changer de modèle ou d'option de GPU ultérieurement, écrivez différents fichiers d'environnement, sourcez à nouveau l'environnement et répétez la section "Implémentation". Les charges de travail de plusieurs modèles peuvent s'exécuter côte à côte dans le même espace de noms, car chaque nom de ressource est dérivé du nom du modèle.

GPU Mémoire Types de machine Type de ressource d'accélérateur
NVIDIA A100 40 Go a2-highgpu-1g-gdc nvidia.com/gpu-pod-NVIDIA_A100_PCIE_40GB
NVIDIA A100 80 Go a2-ultragpu-1g-gdc, a2-ultragpu-2g-gdc nvidia.com/gpu-pod-NVIDIA_A100_80GB_PCIE
NVIDIA H100 94 Go a3-highgpu-1g-gdc (aperçu), a3-highgpu-2g-gdc (aperçu), a3-highgpu-4g-gdc nvidia.com/gpu-pod-NVIDIA_H100_NVL
NVIDIA H200 141 Go a3-ultragpu-8g-gdc nvidia.com/gpu-pod-NVIDIA_H200
NVIDIA B300 288 Go a4-ultragpu-8g-gdc nvidia.com/gpu-pod-NVIDIA_B300_SXM6_AC
  • Créez les fichiers d'environnement de modèle et d'accélérateur pour le modèle et l'option de GPU que vous souhaitez déployer.

Gemma 4 E2B

Attribut Valeur
Tag Ollama gemma4:e2b
Paramètres 5,1 milliards (2 milliards effectifs)
Licence Conditions d'utilisation de Gemma
Pondérations Quantification par défaut d'Ollama, environ 4,6 Go
Longueur de contexte 128 000 jetons

Créez le fichier d'environnement du modèle :

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/model.sh && echo "Successfully created." || echo "Failed to create!"
# Model: Gemma 4 E2B
export GDCS_OLLAMA_MODEL="gemma4:e2b"
EOF

Créez le fichier d'environnement de l'accélérateur pour votre option de GPU :

NVIDIA A100 40 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 40 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_PCIE_40GB"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="12Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="6Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA A100 80 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 80 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_80GB_PCIE"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="12Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="6Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H100 94 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H100 94 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H100_NVL"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="12Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="6Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H200 141 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H200 141 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H200"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="12Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="6Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA B300 288 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA B300 288 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_B300_SXM6_AC"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="12Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="6Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

Gemma 4 E4B

Attribut Valeur
Tag Ollama gemma4:e4b
Paramètres 8 milliards (4 milliards effectifs)
Licence Conditions d'utilisation de Gemma
Pondérations Quantification par défaut d'Ollama, environ 6,6 Go
Longueur de contexte 128 000 jetons

Créez le fichier d'environnement du modèle :

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/model.sh && echo "Successfully created." || echo "Failed to create!"
# Model: Gemma 4 E4B
export GDCS_OLLAMA_MODEL="gemma4:e4b"
EOF

Créez le fichier d'environnement de l'accélérateur pour votre option de GPU :

NVIDIA A100 40 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 40 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_PCIE_40GB"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA A100 80 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 80 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_80GB_PCIE"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H100 94 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H100 94 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H100_NVL"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H200 141 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H200 141 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H200"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA B300 288 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA B300 288 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_B300_SXM6_AC"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

Gemma 4 12B

Attribut Valeur
Tag Ollama gemma4:12b
Paramètres 12B (dense)
Licence Conditions d'utilisation de Gemma
Pondérations Quantification par défaut d'Ollama, environ 7,7 Go
Longueur de contexte 256k tokens (256 000 jetons)

Créez le fichier d'environnement du modèle :

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/model.sh && echo "Successfully created." || echo "Failed to create!"
# Model: Gemma 4 12B
export GDCS_OLLAMA_MODEL="gemma4:12b"
EOF

Créez le fichier d'environnement de l'accélérateur pour votre option de GPU :

NVIDIA A100 40 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 40 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_PCIE_40GB"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA A100 80 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 80 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_80GB_PCIE"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H100 94 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H100 94 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H100_NVL"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H200 141 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H200 141 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H200"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA B300 288 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA B300 288 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_B300_SXM6_AC"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="16Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="8Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

Gemma 4 26B-A4B

Attribut Valeur
Tag Ollama gemma4:26b
Paramètres 25,8 milliards au total/4 milliards actifs (Mixture of Experts)
Licence Conditions d'utilisation de Gemma
Pondérations Quantification par défaut d'Ollama, environ 16 Go
Longueur de contexte 256k tokens (256 000 jetons)

Créez le fichier d'environnement du modèle :

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/model.sh && echo "Successfully created." || echo "Failed to create!"
# Model: Gemma 4 26B-A4B
export GDCS_OLLAMA_MODEL="gemma4:26b"
EOF

Créez le fichier d'environnement de l'accélérateur pour votre option de GPU :

NVIDIA A100 40 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 40 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_PCIE_40GB"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="32Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="16Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA A100 80 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 80 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_80GB_PCIE"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="32Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="16Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H100 94 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H100 94 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H100_NVL"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="32Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="16Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H200 141 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H200 141 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H200"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="32Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="16Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA B300 288 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA B300 288 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_B300_SXM6_AC"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="32Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="16Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

Gemma 4 31B

Attribut Valeur
Tag Ollama gemma4:31b
Paramètres 31,3 milliards (dense)
Licence Conditions d'utilisation de Gemma
Pondérations Quantification par défaut d'Ollama, environ 19 Go
Longueur de contexte 256k tokens (256 000 jetons)

Créez le fichier d'environnement du modèle :

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/model.sh && echo "Successfully created." || echo "Failed to create!"
# Model: Gemma 4 31B
export GDCS_OLLAMA_MODEL="gemma4:31b"
EOF

Créez le fichier d'environnement de l'accélérateur pour votre option de GPU :

NVIDIA A100 40 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 40 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_PCIE_40GB"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="40Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="20Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA A100 80 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA A100 80 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_A100_80GB_PCIE"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="40Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="20Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H100 94 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H100 94 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H100_NVL"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="40Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="20Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA H200 141 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA H200 141 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_H200"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="40Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="20Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF

NVIDIA B300 288 Go

cat << 'EOF' > ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.d/accelerator.sh && echo "Successfully created." || echo "Failed to create!"
# Accelerator: NVIDIA B300 288 GB
export GDCS_WORKLOAD_ACCELERATOR_TYPE="nvidia.com/gpu-pod-NVIDIA_B300_SXM6_AC"
export GDCS_WORKLOAD_ACCELERATOR_COUNT="1"

# Resources
export GDCS_WORKLOAD_CPU_LIMIT="4"
export GDCS_WORKLOAD_CPU_REQUEST="2"
export GDCS_WORKLOAD_MEMORY_LIMIT="40Gi"
export GDCS_WORKLOAD_MEMORY_REQUEST="20Gi"

# Ollama
export GDCS_OLLAMA_NUM_PARALLEL="4"
export GDCS_OLLAMA_TEST_NUM_PREDICT="128"
EOF
  1. Sourcez le fichier d'environnement :

    source ${HOME}/gdcag-solutions/open-weight-models/ollama/gemma/env.sh
    

Cluster

  1. Récupérez les identifiants du cluster :

    gdcloud clusters get-credentials "${GDC_STANDARD_CLUSTER_NAME}" \
    --project="${GDC_PROJECT}"
    
  2. Vérifiez que le type de ressource d'accélérateur du fichier d'environnement d'accélérateur est disponible dans le cluster :

    kubectl get nodes \
    -o custom-columns='NAME:.metadata.name,ACCELERATOR:.status.allocatable.'"${GDCS_WORKLOAD_ACCELERATOR_TYPE}"
    

Implémentation

Espace de noms

  1. Créez l'espace de noms :

    kubectl create namespace "${GDCS_WORKLOAD_NAMESPACE}" \
    --dry-run=client \
    --output=yaml | kubectl apply -f -
    
  2. Ajoutez le imagePullSecret :

    kubectl create secret docker-registry "${GDCS_HARBOR_K8S_PULL_SECRET}" \
    --dry-run=client \
    --from-file=.dockerconfigjson=${GDCS_HARBOR_K8S_DOCKER_CONFIG}/config.json \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}" \
    --output=yaml | kubectl apply -f -
    

Pondérations de modèle

  1. Téléchargez les pondérations du modèle :

    ${GDCS_IMPLEMENTATION_HOME}/ollama_model_weight_download.sh
    
  2. Calculez la taille de PersistentVolumeClaim requise à partir des pondérations du modèle téléchargé avec une surcharge de 25 % (arrondie au Gio entier supérieur) :

    MODEL_KIB=$(du -sk "${GDCS_OLLAMA_MODEL_DOWNLOAD_DIR}" | awk '{print $1}')
    export GDCS_MODEL_PVC_SIZE="$(( (MODEL_KIB * 125 / 100 + 1048575) / 1048576 ))Gi"
    echo "GDCS_MODEL_PVC_SIZE=${GDCS_MODEL_PVC_SIZE}"
    
  3. Créez le fichier manifeste pour le PersistentVolumeClaim pour les pondérations du modèle :

    cat <<EOF > "${GDCS_USER_GUIDE_HOME}/${GDCS_WORKLOAD_NAME}-pvc.yaml" && echo "Successfully created." || echo "Failed to create!"
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: ${GDCS_WORKLOAD_NAME}-rwo
      namespace: ${GDCS_WORKLOAD_NAMESPACE}
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: ${GDCS_MODEL_PVC_SIZE}
    EOF
    
  4. Appliquez le fichier manifeste du PersistentVolumeClaim pour les pondérations du modèle :

    kubectl apply --filename="${GDCS_USER_GUIDE_HOME}/${GDCS_WORKLOAD_NAME}-pvc.yaml"
    
  5. Attendez que PersistentVolumeClaim lie et affiche les valeurs dont l'opérateur d'infrastructure a besoin pour ajuster la règle de qualité de service (QoS) des E/S :

    kubectl wait \
    --for=jsonpath='{.status.phase}'=Bound \
    "pvc/${GDCS_WORKLOAD_NAME}-rwo" \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}" \
    --timeout=120s
    BACKING_PVC=$(kubectl get pvc "${GDCS_WORKLOAD_NAME}-rwo" \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}" \
    --output=jsonpath='{.spec.volumeName}')
    echo "BACKING_PVC=${BACKING_PVC} ORG=${GDC_ORG}"
    
  6. Si performance-rwo n'est pas disponible sur votre cluster, demandez à votre opérateur d'infrastructure d'appliquer la règle de QoS hautes performances (system-performance-<ORG>-admin, 30 IOPS par Gio avec un seuil minimal de 6 148 IOPS) au volume qui sauvegarde le PersistentVolumeClaim. Indiquez les valeurs BACKING_PVC et ORG affichées à l'étape précédente. L'opérateur d'infrastructure applique la règle comme décrit dans le playbook FILE-R0097 de la documentation de l'opérateur d'infrastructure. Elle prend effet sur le volume actif, ce qui vous permet de passer aux étapes suivantes.

  7. Créez le fichier manifeste pour le chargeur de modèle Pod :

    cat <<EOF > "${GDCS_USER_GUIDE_HOME}/${GDCS_WORKLOAD_NAME}-loader.yaml" && echo "Successfully created." || echo "Failed to create!"
    apiVersion: v1
    kind: Pod
    metadata:
      name: ${GDCS_MODEL_LOADER_POD_NAME}
      namespace: ${GDCS_WORKLOAD_NAMESPACE}
    spec:
      containers:
        - command: ["/bin/sh", "-c", "trap 'exit 0' TERM; while :; do sleep 1; done"]
          image: ${GDCS_HARBOR_PROJECT_URI}/busybox/busybox:${GDCS_BUSYBOX_IMAGE_TAG}
          imagePullPolicy: IfNotPresent
          name: loader
          volumeMounts:
            - mountPath: ${GDCS_OLLAMA_PV_MOUNT_PATH}
              name: model-cache
      imagePullSecrets:
        - name: ${GDCS_HARBOR_K8S_PULL_SECRET}
      restartPolicy: Never
      volumes:
        - name: model-cache
          persistentVolumeClaim:
            claimName: ${GDCS_WORKLOAD_NAME}-rwo
    EOF
    
  8. Appliquez le fichier manifeste pour le chargeur de modèle Pod :

    kubectl apply --filename="${GDCS_USER_GUIDE_HOME}/${GDCS_WORKLOAD_NAME}-loader.yaml"
    
  9. Attendez que le chargeur de modèle Pod soit en cours d'exécution :

    kubectl wait \
    --for=jsonpath='{.status.phase}'=Running \
    "pod/${GDCS_MODEL_LOADER_POD_NAME}" \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}" \
    --timeout=120s
    
  10. Importez les pondérations du modèle :

    ${GDCS_IMPLEMENTATION_HOME}/model_weight_upload.sh \
    --local-dir="${GDCS_OLLAMA_MODEL_DOWNLOAD_DIR}" \
    --pod="${GDCS_MODEL_LOADER_POD_NAME}" \
    --target-dir="${GDCS_OLLAMA_PV_MOUNT_PATH}"
    
  11. Supprimez le chargeur de modèle Pod :

    kubectl delete pod "${GDCS_MODEL_LOADER_POD_NAME}" \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}"
    

Serveur d'inférence

  1. Créez le fichier manifeste pour le Deployment Ollama :

    cat <<EOF > "${GDCS_USER_GUIDE_HOME}/${GDCS_WORKLOAD_NAME}-deployment.yaml" && echo "Successfully created." || echo "Failed to create!"
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: ${GDCS_WORKLOAD_NAME}
    data:
      OLLAMA_FLASH_ATTENTION: "1"
      OLLAMA_HOST: "0.0.0.0"
      OLLAMA_KEEP_ALIVE: "-1"
      OLLAMA_MODELS: "${GDCS_OLLAMA_PV_MOUNT_PATH}"
      OLLAMA_NUM_PARALLEL: "${GDCS_OLLAMA_NUM_PARALLEL}"
      OLLAMA_ORIGINS: "*"
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: ${GDCS_WORKLOAD_NAME}
      labels:
        app: ${GDCS_WORKLOAD_NAME}
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: ${GDCS_WORKLOAD_NAME}
      strategy:
        type: Recreate
      template:
        metadata:
          labels:
            app: ${GDCS_WORKLOAD_NAME}
        spec:
          containers:
            - envFrom:
                - configMapRef:
                    name: ${GDCS_WORKLOAD_NAME}
              image: ${GDCS_HARBOR_PROJECT_URI}/ollama/ollama:${GDCS_OLLAMA_IMAGE_TAG}
              imagePullPolicy: IfNotPresent
              lifecycle:
                postStart:
                  exec:
                    command:
                      - /bin/sh
                      - -c
                      - |
                        echo "Waiting for local API to respond..."
                        timeout=60
                        until /bin/ollama list > /dev/null 2>&1 || [ "\$timeout" -le 0 ]; do
                          sleep 1
                          timeout=\$((timeout - 1))
                        done
                        if [ "\$timeout" -le 0 ]; then
                          echo "Timed out waiting for Ollama server to start." >&2
                          exit 1
                        fi
                        echo "Preloading model into memory..."
                        /bin/ollama run "${GDCS_OLLAMA_MODEL}" ""
              livenessProbe:
                failureThreshold: 3
                httpGet:
                  path: /
                  port: 11434
                periodSeconds: 30
                timeoutSeconds: 10
              name: ollama
              ports:
                - containerPort: 11434
                  name: http-ollama
              readinessProbe:
                failureThreshold: 3
                httpGet:
                  path: /api/tags
                  port: 11434
                periodSeconds: 10
                successThreshold: 1
                timeoutSeconds: 5
              resources:
                limits:
                  cpu: ${GDCS_WORKLOAD_CPU_LIMIT}
                  memory: ${GDCS_WORKLOAD_MEMORY_LIMIT}
                  ${GDCS_WORKLOAD_ACCELERATOR_TYPE}: "${GDCS_WORKLOAD_ACCELERATOR_COUNT}"
                requests:
                  cpu: ${GDCS_WORKLOAD_CPU_REQUEST}
                  memory: ${GDCS_WORKLOAD_MEMORY_REQUEST}
                  ${GDCS_WORKLOAD_ACCELERATOR_TYPE}: "${GDCS_WORKLOAD_ACCELERATOR_COUNT}"
              securityContext:
                allowPrivilegeEscalation: false
                seLinuxOptions:
                  type: spc_t
              startupProbe:
                failureThreshold: 60
                httpGet:
                  path: /
                  port: 11434
                periodSeconds: 10
                timeoutSeconds: 5
              volumeMounts:
                - mountPath: ${GDCS_OLLAMA_PV_MOUNT_PATH}
                  name: model-cache
                - mountPath: /dev/shm
                  name: shm
          imagePullSecrets:
            - name: ${GDCS_HARBOR_K8S_PULL_SECRET}
          volumes:
            - name: model-cache
              persistentVolumeClaim:
                claimName: ${GDCS_WORKLOAD_NAME}-rwo
            - emptyDir:
                medium: Memory
                sizeLimit: "8Gi"
              name: shm
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: ${GDCS_WORKLOAD_NAME}
    spec:
      ports:
        - name: http-ollama
          port: 80
          protocol: TCP
          targetPort: 11434
      selector:
        app: ${GDCS_WORKLOAD_NAME}
      type: LoadBalancer
    EOF
    
  2. Appliquez le fichier manifeste pour l'Deployment Ollama :

    kubectl apply --filename="${GDCS_USER_GUIDE_HOME}/${GDCS_WORKLOAD_NAME}-deployment.yaml" --namespace="${GDCS_WORKLOAD_NAMESPACE}"
    
  3. Créez le fichier manifeste pour le NetworkPolicy Ollama :

    cat <<EOF > "${GDCS_USER_GUIDE_HOME}/ollama-netpol.yaml" && echo "Successfully created." || echo "Failed to create!"
    apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
      name: allow-ollama-ingress
      namespace: ${GDCS_WORKLOAD_NAMESPACE}
    spec:
      ingress:
      - from:
        - ipBlock:
            cidr: 0.0.0.0/0
        - namespaceSelector: {}
        ports:
        - port: 11434
          protocol: TCP
      podSelector: {}
      policyTypes:
      - Ingress
    EOF
    
  4. Appliquez le fichier manifeste pour l'NetworkPolicy Ollama :

    kubectl apply --filename="${GDCS_USER_GUIDE_HOME}/ollama-netpol.yaml"
    
  5. Attendez que le Pod soit en cours d'exécution :

    kubectl wait \
    --for=jsonpath='{.status.phase}'=Running \
    "pod" \
    --selector="app=${GDCS_WORKLOAD_NAME}" \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}" \
    --timeout=300s
    
  6. Attendez que le Deployment soit prêt :

    kubectl wait \
    --for=condition=Available \
    "deployment/${GDCS_WORKLOAD_NAME}" \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}" \
    --timeout=600s
    
  7. Facultatif : Diffusez les journaux du conteneur pour surveiller la progression du démarrage :

    kubectl logs deployment/${GDCS_WORKLOAD_NAME} \
    --follow \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}"
    

Validation

  1. Récupérez l'adresse IP de l'équilibreur de charge pour Ollama :

    export OLLAMA_LB_IP=$(kubectl get service/${GDCS_WORKLOAD_NAME} --namespace="${GDCS_WORKLOAD_NAMESPACE}" --output=jsonpath='{.status.loadBalancer.ingress[*].ip}')
    echo "OLLAMA_LB_IP=${OLLAMA_LB_IP}"
    
  2. Envoyez une requête de test à Ollama à l'aide de l'équilibreur de charge (API Ollama, génération de texte) :

    curl http://${OLLAMA_LB_IP}/api/generate \
    -H "Content-Type: application/json" \
    -d '{
      "model": "'${GDCS_OLLAMA_MODEL}'",
      "prompt": "Explain Google Distributed Cloud air-gapped briefly.",
      "stream": false
    }'
    
  3. Envoyez une requête de test en streaming :

    curl http://${OLLAMA_LB_IP}/api/generate \
    -H "Content-Type: application/json" \
    -d '{
      "model": "'${GDCS_OLLAMA_MODEL}'",
      "prompt": "Explain Google Distributed Cloud air-gapped briefly.",
      "stream": true
    }'
    
  4. Envoyez une requête de test à l'API Ollama compatible avec OpenAI à l'aide de l'équilibreur de charge :

    curl http://${OLLAMA_LB_IP}/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
      "model": "'${GDCS_OLLAMA_MODEL}'",
      "messages": [
        {"role": "user", "content": "Explain Google Distributed Cloud air-gapped briefly."}
      ]
    }'
    
  5. Envoyez une requête de test à Ollama à l'aide du transfert de port :

    kubectl port-forward service/${GDCS_WORKLOAD_NAME} \
    --namespace="${GDCS_WORKLOAD_NAMESPACE}" 11434:80 &
    PF_PID=$!
    
    sleep 1
    
    curl http://127.0.0.1:11434/api/tags
    
    kill ${PF_PID}