Now I am going to run it locally, because I want to share a docker file with others, e.g. on github. I clicked 3-dot button > Run with Docker > copied the code > run it in the Terminal of 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.py
Of course I replaced the value with my real OpenAI API key.
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:latest docker push lorentzyeung/entz-llm-5:latest
After that I test it with these codes: docker pull lorentzyeung/entz-llm-5:latest docker images
Yes 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:latest
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.