Docker Image successfully downloaded but fail to run locally
Hello everyone, I have created and run successfully an app, which is here:KaggleX Learning Path Index Chatbot (Demo) - a Hugging Face Space by EntzNow I am going to run it locally, because I want to share a docker file with others, e.g. on github. I clicked3-dot button>Run with Docker>copied the code>run it in the Terminalof my M1 Mac.The copied code is here:docker run -it -p 7860:7860 --platform=linux/amd64 \
	-e OPENAI_API_KEY="YOUR_VALUE_HERE" \
	registry.hf.space/entz-llm-5:latest streamlit run app.pyOf course I replaced the value with my real OpenAI API key.The files were downloaded successfully,image1278×306 30.8 KBI tried all these URLs:Network URL:http  ://172.17.0.2:8501External URL:http. ://87.74.142.113:8501None of them work. I tried alsolocalhost:7860It doesn’t work too.Does anyone have similar experience? How do I fix it? Thank you.
2024-02-16T20:14:46Z
I think the problem is my computer is a Mac M1. Does anyone know how to solve it?
2024-02-17T00:59:12Z
hi@Entz,The issue lies in the exposed port within your Docker command. Thank you for the bug report. Here is the correct method:docker run -it -p 8501:8501 --platform=linux/amd64 \
        -e OPENAI_API_KEY="YOUR_VALUE_HERE" \
        registry.hf.space/entz-llm-5:latest streamlit run app.pyThen you can go tohttp://localhost:8501/
2024-02-17T06:26:53Z
it works like charm thank you@radamesBut why the official instruction is wrong to start with?Screenshot 2024-02-17 at 06.26.041520×904 126 KB
2024-02-17T07:01:54Z
Now I have successfully pulled the huggingface docker image, and run it locally, thank you for your port 8501 solution.I then push this image to Docker Hub with these codes:docker tag 5946b8e1f6d0 lorentzyeung/entz-llm-5:latestdocker push lorentzyeung/entz-llm-5:latestAfter that I test it with these codes:docker pull lorentzyeung/entz-llm-5:latestdocker imagesYes it is pulled successfully.Finally i run it with this code:docker run -it -p 8501:8501 --platform=linux/amd64 -e OPENAI_API_KEY="THEIR_OPENAI_API_KEY"  lorentzyeung/entz-llm-5:latestIt throws me the same error again:Screenshot 2024-02-17 at 07.01.051194×1324 36.2 KBWould you please help?
2024-02-17T18:27:07Z
bug, we’re going to fix the instructions! thanks for raising the issue
2024-02-17T18:28:39Z
I’m sorry, I’m not sure if I can help you here. If you’re using the same image, it should works as before.
2024-02-17T23:51:25Z
no problem@radames
2024-02-17T23:53:47Z
Nevermind@radames, i don’t know why as well. I tried several times. I even cleaned all caches and repushed and repulled the image again and again, still it doesn’ t run. I don’t understand why. It is just the same image i pulled from Huggingface.
2024-02-18T11:53:54Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.