Hi,
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 )
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.
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?
The problem is that it can’t find the streamlit executable. In the case of installing streamlit with conda, the streamlit executable will be in miniconda3/bin/streamlit
@Dynamo-github
Welcome to the community.
Please give us some more details about your specific problem or share a link to a public github repository so we can take a look.
I am not able to keep the docker container with my streamlit app running. The example works fine, but when I pull data using snowflake.connector, the container closes as soon as the query completes (and before all the other stuff I have in my app).
in Dockerfile: FROM python:3.9-slim
in requirements.txt: snowflake-connector-python~=2.7.2
I tried putting a decorator above the function to pull the data (@st.experimental_memo(persist=True))
I tried ChatGPT’s idea to add a while True: sleep(1) at the end of the script.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.