Open satarupaguha11 opened 1 month ago
I have encountered the same problem using github codespaces.
Please check below instruction:
@rnpramasamyai I already have these permissions- I am an owner of the subscription. It also works when I deploy from the devcontainer using the docker option. So access issues do not seem to be the reason for this failure.
@satarupaguha11 if you update https://github.com/Azure-Samples/graphrag-accelerator/blob/c211508a7d569ea71f831a171cc5cbd832c69264/infra/deploy.sh#L533 and remove > /dev/null 2>&1
from the end of the line, and run again, you should get more logging output to go on.
Add resource group to both az acr show and az acr build command. When resource group is not included, existing ACR will not be found.
createAcrIfNotExists() {
printf "Checking if container registry exists... "
local existingRegistry
existingRegistry=$(az acr show --name $CONTAINER_REGISTRY_SERVER **--resource-group $RESOURCE_GROUP** --query loginServer -o tsv 2>/dev/null)
if [ $? -eq 0 ]; then
printf "Yes.\nUsing existing registry '$existingRegistry'.\n"
CONTAINER_REGISTRY_SERVER=$existingRegistry
return 0
fi
# else deploy a new container registry
printf "No.\nCreating container registry... "
AZURE_ACR_DEPLOY_RESULT=$(az deployment group create --resource-group $RESOURCE_GROUP --name "acr-deployment" --template-file core/acr/acr.bicep --only-show-errors --no-prompt -o json \
--parameters "name=$CONTAINER_REGISTRY_SERVER")
exitIfCommandFailed $? "Error creating container registry, exiting..."
CONTAINER_REGISTRY_SERVER=$(jq -r .properties.outputs.loginServer.value <<< $AZURE_ACR_DEPLOY_RESULT)
exitIfValueEmpty "$CONTAINER_REGISTRY_SERVER" "Unable to parse container registry login server from deployment, exiting..."
printf "'$CONTAINER_REGISTRY_SERVER' created.\n"
}
deployDockerImageToACR() { printf "Deploying docker image '${GRAPHRAG_IMAGE}' to container registry '${CONTAINER_REGISTRY_SERVER}'..." local SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
az acr build --registry $CONTAINER_REGISTRY_SERVER **--resource-group $RESOURCE_GROUP** -f $SCRIPT_DIR/../docker/Dockerfile-backend --image $GRAPHRAG_IMAGE $SCRIPT_DIR/../ > /dev/null 2>&1
exitIfCommandFailed $? "Error deploying docker image, exiting..."
printf " Done.\n"
}
@satarupaguha11 Please update your Linux subsystem if you are using Linux on Windows. It solved many issues when I tried to deploy this repo.
Describe the bug All the required packages (recommended versions) are installed and deploy.parameters.json have been filled in with the required variable values. I did not create a container registry beforehand as it was not marked as a required variable.
However, it throws an error - "Deploying docker image 'graphrag:backend' to container registry 'xxxx.azurecr.io'...Error deploying docker image, exiting.." I have reproduced this bug both on Windows as well as WSL.
To Reproduce Steps to reproduce the behavior:
Expected behavior Deployment should automatically complete successfully.
Screenshots![image](https://github.com/user-attachments/assets/3bcd4364-7142-4126-a918-c3848a22afb2)
Desktop (please complete the following information):
Additional context I already had AOAI resources which I have filled in. I however didn't find any instruction about setting up cognitive services resources, so I didn't provide them anywhere.