Closed chenyugithub365 closed 4 months ago
Hi, @chenyugithub365 , thanks for reporting the issue, could you please share your build dockerfile and run file in runit?
Hello, @YingChen1996 , you need the Dockerfile and runit file, right? These files are unmodified and generated by Promptflow. runit.zip Dockerfile.txt
according to the run, it seems you will create connection in the container
But according to the log.txt there're no connection creation process like below:
your log:
But I can't repro the issue, could you please share your example flow? I want to check it's docker environment issue or flow issue.
btw, make sure docker run your container like below to set your connection key:
I can provide the project code and the complete built files, but I have desensitized some files: dist\connections and chat\python_enterprise_website_knowledge_search.py and dist\flow\python_enterprise_website_knowledge_search.py. I don't think this should affect the troubleshooting of the problem.
The command to start the Docker image is: docker run -p 8080:8080 -e AZURE_OPENAI_JAPANEAST_API_KEY=xxx -e AZURE_OPENAI_WESTUS_API_KEY=xxx -d chat:latest
it seems there're typo in your requirements.txt pywin32==306
: not match version, actually docker is for linux/mac environment.
For the issue, I can repro now. I think maybe it's because some package issue. When I only keep the 2 packages in requirement.txt, it can create connection successfully. I will follow up with folks to continue investigate.
the root cause is that kering_pass.cfg
is not generated by keyrings.alt, maybe you need double check your package list in requirement.txt
correct one should be
Great, your discovery is excellent. It seems that too many dependency packages were imported. I exported all the packages in the virtual environment. The dependency packages pywin32==306 and pywin32-ctypes==0.2.2 were manually removed when creating the image, so there was no impact.
I will reduce the number of dependency packages.
Hi, @YingChen1996 , I have successfully resolved the issue based on your guidance. The solution is to streamline the dependencies configured in the requirements.txt file (in fact, only promptflow and promptflow-tools need to be retained). Thank you very much.
Describe the bug Hello everyone, after completing my PromptFlow, I tried to deploy it using Docker but encountered an issue: "Connection 'xxxxxxx' is not found."
How To Reproduce the bug 1.Build command used: pf flow build --source "D:\work\source code\AIGC_Flow\chat" --output dist --format docker
2.Connection configuration has been created.
3.Details of the connection configuration.
4.Dependency package check for the Docker image.
5.Error encountered when calling the Docker image after it is started.
6.Logs of the Docker image after it is started. logs.txt
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Running Information(please complete the following information):
pf -v
: 1.2.0python --version
: Python 3.9.16Additional context Add any other context about the problem here.