Azure Fonksiyonları Dağıtılırken Azure Pipeline Hataları

This article was translated from English: Does it need improvement?
Translated
View the article in English

IronPDF kullanan bir Azure Fonksiyonu dağıtırken, Azure Pipeline'ınızdaki DeploymentType, auto veya zipDeploy ayarlandıysa aşağıdaki hatayla karşılaşabilirsiniz.

[0714/125524.684:FATAL:gpu_data_manager_impl_private.cc(440)] GPU process isn't usable. Goodbye.

Bu hata, IronPDF'in bağımlı olduğu yerel ikili dosyaları, Chromium Embedded Framework (CEF) bileşenleri dahil, düzgün bir şekilde korumadığı için meydana gelir. Bu ikili dosyalar dağıtımdan sonra eksik veya bozuksa, GPU süreci çalışma zamanında başarısız olur.

Çözüm

DeploymentType öğesini webDeploy olarak AzureRmWebAppDeployment@4 görevinde değiştirin. Bu dağıtım yöntemi, dağıtım sürecinde tüm yerel ikili dosyaları, CEF dahil, korur.

Yayın adımında çıktı klasörünün dağıtımdan önce sıkıştırılmaması için de zipAfterPublish: false ayarlayın.

Aşağıdaki pipeline YAML, önerilen tam yapılandırmayı göstermektedir:

jobs:
  - job:
    steps:
    - checkout: self
      displayName: Checkout Repository
      lfs: true

    - task: AzureCLI@2
      displayName: Check Azure CLI Installation
      inputs:
        azureSubscription: '<your-azure-subscription-name>'
        scriptType: 'ps'
        scriptLocation: 'inlineScript'
        inlineScript: 'az --version'

    - task: DotNetCoreCLI@2
      displayName: Restore Function Project
      inputs:
        command: 'restore'
        projects: '<path-to-your-csproj>'

    - task: DotNetCoreCLI@2
      displayName: Build Function Project
      inputs:
        command: 'build'
        projects: '<path-to-your-csproj>'
        arguments: '--configuration Release --no-restore --verbosity normal'

    - task: DotNetCoreCLI@2
      displayName: Publish Function Project
      inputs:
        command: publish
        arguments: '--configuration Release --no-build --output $(Build.ArtifactStagingDirectory)/publish_output'
        projects: '<path-to-your-csproj>'
        publishWebProjects: false
        modifyOutputPath: false
        zipAfterPublish: false

    - task: AzureRmWebAppDeployment@4
      displayName: 'Deploy Azure Function App'
      inputs:
        ConnectionType: 'AzureRM'
        azureSubscription: '<your-azure-subscription-name>'
        appType: 'functionApp'
        WebAppName: '<your-azure-function-app-name>'
        enableCustomDeployment: true
        DeploymentType: 'webDeploy'
jobs:
  - job:
    steps:
    - checkout: self
      displayName: Checkout Repository
      lfs: true

    - task: AzureCLI@2
      displayName: Check Azure CLI Installation
      inputs:
        azureSubscription: '<your-azure-subscription-name>'
        scriptType: 'ps'
        scriptLocation: 'inlineScript'
        inlineScript: 'az --version'

    - task: DotNetCoreCLI@2
      displayName: Restore Function Project
      inputs:
        command: 'restore'
        projects: '<path-to-your-csproj>'

    - task: DotNetCoreCLI@2
      displayName: Build Function Project
      inputs:
        command: 'build'
        projects: '<path-to-your-csproj>'
        arguments: '--configuration Release --no-restore --verbosity normal'

    - task: DotNetCoreCLI@2
      displayName: Publish Function Project
      inputs:
        command: publish
        arguments: '--configuration Release --no-build --output $(Build.ArtifactStagingDirectory)/publish_output'
        projects: '<path-to-your-csproj>'
        publishWebProjects: false
        modifyOutputPath: false
        zipAfterPublish: false

    - task: AzureRmWebAppDeployment@4
      displayName: 'Deploy Azure Function App'
      inputs:
        ConnectionType: 'AzureRM'
        azureSubscription: '<your-azure-subscription-name>'
        appType: 'functionApp'
        WebAppName: '<your-azure-function-app-name>'
        enableCustomDeployment: true
        DeploymentType: 'webDeploy'
YAML

<your-azure-subscription-name>, <path-to-your-csproj> ve <your-azure-function-app-name> öğelerini gerçek değerlerinizle değiştirin. Genel Azure Fonksiyonları kurulumu ve yapılandırması için Azure dağıtım kılavuzuna bakın.

Curtis Chau
Teknik Yazar

Curtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapı...

Daha Fazla Oku
Başlamaya Hazır mısınız?
Nuget İndirmeler 20,088,359 | Sürüm: 2026.7 yeni yayınlandı
Still Scrolling Icon

Hâlâ Kaydırıyor Musunuz?

Hızlıca kanıt ister misiniz? PM > Install-Package IronPdf
bir örnek çalıştır HTML'nizi bir PDF'ye dönüştüğünü izleyin.