From fb4a953756516c8ba1b021a40bfe73c453a310e5 Mon Sep 17 00:00:00 2001 From: Fabrizio Ruocco Date: Thu, 25 May 2023 20:29:01 +0200 Subject: [PATCH 1/3] mod docker build and README --- .env.sample | 1 - README.md | 1 - WebApp.Dockerfile | 6 ++++-- infrastructure/deployment.json | 12 ------------ 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.env.sample b/.env.sample index 7e9efb6a8f..71e23100c8 100644 --- a/.env.sample +++ b/.env.sample @@ -13,7 +13,6 @@ AZURE_SEARCH_URL_COLUMN= AZURE_OPENAI_RESOURCE= AZURE_OPENAI_MODEL= AZURE_OPENAI_KEY= -AZURE_OPENAI_DEPLOYMENT= AZURE_OPENAI_TEMPERATURE=0 AZURE_OPENAI_TOP_P=1.0 AZURE_OPENAI_MAX_TOKENS=1000 diff --git a/README.md b/README.md index 5a27178523..f2770f55db 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,6 @@ Feel free to fork this repository and make your own modifications to the UX or b |AZURE_OPENAI_RESOURCE||| |AZURE_OPENAI_MODEL||| |AZURE_OPENAI_KEY||| -|AZURE_OPENAI_DEPLOYMENT||| |AZURE_OPENAI_TEMPERATURE|0|| |AZURE_OPENAI_TOP_P|1.0|| |AZURE_OPENAI_MAX_TOKENS|1000|| diff --git a/WebApp.Dockerfile b/WebApp.Dockerfile index 48aa823780..d66e18c77d 100644 --- a/WebApp.Dockerfile +++ b/WebApp.Dockerfile @@ -5,7 +5,9 @@ WORKDIR /home/node/app COPY ./frontend/package*.json ./ USER node RUN npm ci -COPY --chown=node:node ./frontend/ . +COPY --chown=node:node ./frontend/ ./frontend +COPY --chown=node:node ./static/ ./static +WORKDIR /home/node/app/frontend RUN npm run build FROM python:3.9.7-alpine3.14 @@ -23,7 +25,7 @@ RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt \ && rm -rf /root/.cache COPY . /usr/src/app/ -COPY --from=frontend /home/node/app/ /usr/src/app/frontend/ +COPY --from=frontend /home/node/app/static /usr/src/app/static/ WORKDIR /usr/src/app EXPOSE 80 CMD ["uwsgi", "--http", ":80", "--wsgi-file", "app.py", "--callable", "app", "-b","32768"] diff --git a/infrastructure/deployment.json b/infrastructure/deployment.json index 8093d3c9d6..738765c788 100644 --- a/infrastructure/deployment.json +++ b/infrastructure/deployment.json @@ -136,7 +136,6 @@ }, "AzureOpenAIModel": { "type": "string", - "defaultValue": "text-davinci-003", "metadata": { "description": "Azure OpenAI Model" } @@ -147,13 +146,6 @@ "description": "Azure OpenAI Key" } }, - "AzureOpenAIDeployment": { - "type": "string", - "defaultValue": "text-davinci-003", - "metadata": { - "description": "Azure OpenAI Deployment" - } - }, "AzureOpenAITemperature": { "type": "int", "defaultValue": 0, @@ -291,10 +283,6 @@ "name": "AZURE_OPENAI_KEY", "value": "[parameters('AzureOpenAIKey')]" }, - { - "name": "AZURE_OPENAI_DEPLOYMENT", - "value": "[parameters('AzureOpenAIDeployment')]" - }, { "name": "AZURE_OPENAI_TEMPERATURE", "value": "[parameters('AzureOpenAITemperature')]" From 3a3f769e869f2835cfa278477ebf8fef368302ab Mon Sep 17 00:00:00 2001 From: Fabrizio Ruocco Date: Thu, 25 May 2023 21:04:46 +0200 Subject: [PATCH 2/3] update description for AOAI model deployment name --- infrastructure/deployment.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/deployment.json b/infrastructure/deployment.json index 738765c788..a5fbfdbb4f 100644 --- a/infrastructure/deployment.json +++ b/infrastructure/deployment.json @@ -137,7 +137,7 @@ "AzureOpenAIModel": { "type": "string", "metadata": { - "description": "Azure OpenAI Model" + "description": "Azure OpenAI Model Deployment name" } }, "AzureOpenAIKey": { From 2652256230184b2ebfe32b0802ce3beec93e1a8b Mon Sep 17 00:00:00 2001 From: Fabrizio Ruocco Date: Fri, 26 May 2023 07:23:18 +0200 Subject: [PATCH 3/3] mod default arm template --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2770f55db..8eff4a114b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Note: this app is under construction! ## Deploy the app ### One click Azure deployment -[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fruoccofabrizio%2Fsample-app-aoai-chatGPT%2Fmain%2Finfrastructure%2Fdeployment.json) +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Fsample-app-aoai-chatGPT%2Fmain%2Finfrastructure%2Fdeployment.json) Click on the Deploy to Azure button and configure your settings in the Azure Portal as described in the [Environment variables](#environment-variables) section.