Skip to content

Commit

Permalink
Build and docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
glahaye committed May 17, 2024
1 parent 44cf02f commit 5a97784
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
include:
- { dotnet: "6.0", configuration: Release, os: windows-latest }
- { dotnet: "8.0", configuration: Release, os: windows-latest }

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Package Copilot Chat WebAPI
run: |
scripts\deploy\package-webapi.ps1 -Configuration Release -DotnetFramework net6.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format 'yyyy-MM-dd')" -SkipFrontendFiles ('${{ github.event_name == 'pull_request' }}' -eq 'true')
scripts\deploy\package-webapi.ps1 -Configuration Release -DotnetFramework net8.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format 'yyyy-MM-dd')" -SkipFrontendFiles ('${{ github.event_name == 'pull_request' }}' -eq 'true')
- name: Upload package to artifacts
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-memorypipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
- name: Set .Net Core version
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Package Copilot Chat Memory Pipeline
run: |
scripts\deploy\package-memorypipeline.ps1 -Configuration Release -DotnetFramework net6.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format "yyyy-MM-dd")"
scripts\deploy\package-memorypipeline.ps1 -Configuration Release -DotnetFramework net8.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format "yyyy-MM-dd")"
- name: Upload package to artifacts
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
- name: Set .Net Core version
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Package Copilot Chat Plugins
run: |
scripts\deploy\package-plugins.ps1 `
-BuildConfiguration Release `
-DotNetFramework net6.0 `
-DotNetFramework net8.0 `
-OutputDirectory ${{ github.workspace }}\scripts\deploy `
-Version ${{ steps.versiontag.outputs.versiontag }} `
-InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format "yyyy-MM-dd")"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fail-fast: false
matrix:
include:
- { dotnet: "6.0", configuration: Release, os: ubuntu-latest }
- { dotnet: "8.0", configuration: Release, os: ubuntu-latest }
# Map the job output to step output
outputs:
backend-host: ${{steps.app-name.outputs.backend-host}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-deploy-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
include:
- { dotnet: "6.0", configuration: Release, os: ubuntu-latest }
- { dotnet: "8.0", configuration: Release, os: ubuntu-latest }
outputs:
deployment-id: ${{steps.deployment-id.outputs.deployment_name}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-deploy-memorypipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
include:
- { dotnet: "6.0", configuration: Release, os: ubuntu-latest }
- { dotnet: "8.0", configuration: Release, os: ubuntu-latest }

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-deploy-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
include:
- { dotnet: "6.0", configuration: Release, os: ubuntu-latest }
- { dotnet: "8.0", configuration: Release, os: ubuntu-latest }

runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache-dependency-path: webapp/yarn.lock
cache: "yarn"

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Install dependencies
run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Check formatting
if: steps.find-csproj.outputs.csproj_files != ''
Expand Down
4 changes: 2 additions & 2 deletions docker/memorypipeline/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker build -f docker/webapi/Dockerfile -t chat-copilot-memorypipeline .

# builder
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS builder
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
WORKDIR /source
# generate dev-certs for https
RUN dotnet dev-certs https
Expand All @@ -17,7 +17,7 @@ RUN cd memorypipeline && \


# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=builder /app .
COPY --from=builder /root/.dotnet/corefx/cryptography/x509stores/my/* /root/.dotnet/corefx/cryptography/x509stores/my/
Expand Down
4 changes: 2 additions & 2 deletions docker/plugins/web-searcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker build -f docker/plugins/web-searcher/Dockerfile -t web-searcher .

# builder
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS installer-env
ARG AZURE_FUNCTION_MASTER_KEY
WORKDIR /source
COPY plugins/shared shared
Expand All @@ -13,7 +13,7 @@ RUN cd /source/web-searcher && \
echo "{\"masterKey\":{\"name\":\"master\",\"value\":\"$AZURE_FUNCTION_MASTER_KEY\",\"encrypted\":false},\"functionKeys\":[]}" > /azure-functions-host/Secrets/host.json

# final stage/image
FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4.0-dotnet-isolated6.0-appservice
FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4.0-dotnet-isolated8.0-appservice
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true \
AzureWebJobsSecretStorageType=files
Expand Down
4 changes: 2 additions & 2 deletions docker/webapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker build -f docker/webapi/Dockerfile -t chat-copilot-webapi .

# builder
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS builder
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
WORKDIR /source
# generate dev-certs for https
RUN dotnet dev-certs https
Expand All @@ -15,7 +15,7 @@ RUN cd webapi && \
dotnet publish --use-current-runtime --self-contained false --no-restore -o /app

# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
ENV Kestrel__Endpoints__Http__Url=http://0.0.0.0:8080
WORKDIR /app
COPY --from=builder /app .
Expand Down
2 changes: 0 additions & 2 deletions shared/ServiceConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.KernelMemory;
using Microsoft.KernelMemory.AI;
using Microsoft.KernelMemory.Configuration;
using Microsoft.KernelMemory.ContentStorage.DevTools;
using Microsoft.KernelMemory.MemoryStorage;
using Microsoft.KernelMemory.MemoryStorage.DevTools;
using Microsoft.KernelMemory.Pipeline.Queue.DevTools;
using Microsoft.KernelMemory.Postgres;

namespace CopilotChat.Shared;

Expand Down

0 comments on commit 5a97784

Please sign in to comment.