Streamlit + docker not working

I´m trying to dockerize an app made with streamlit but I´ve tried for four days so far and nothing has worked for me.
It takes ages to build the image and when I try to run it, it returns: /bin/sh: 1: streamlit: not found .
This is my docker file (This is my first time using docker )

FROM continuumio/miniconda3



RUN mkdir -p /root/.streamlit

RUN bash -c 'echo -e "\

WORKDIR /ModelosComercio


ADD environment.yml .

RUN conda env create --file environment.yml

CMD streamlit run

Any help will be apreciated.


Hi @Maria_Isabel_Meneses,

Thanks for posting!

Have you checked out our new doc on deploying with Docker?

Caroline :balloon:

Not actually but I´m working with conda. Would it be the same if instead of “environment.yml” I try to install “requirements.txt” with pip?
I´ve tried with pip and I get the same error so I don´t really know how to handle this pip/conda thing

I´ve just follow the new doc and I get this error when I try to do it with my project: docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: “streamlit”: executable file not found in $PATH: unknown.

What can I do?

Have you tried following the doc (i.e. using the exact Dockerfile and docker run command in the doc and using pip and requirements.txt instead of conda?

Yes, I´ve tried with pip and requirements.txt. Same result

I’m at a loss as I’m unable to reproduce the behavior. I’ll defer to the rest of the community for solutions :sweat_smile: