App in Streamlit Cloud not running in the same way as on local host

hi …

I managed , for most part, deployed my app to Streamlit cloud and ended with the following message.

2022-01-14 08:52:14.477940: I tensorflow/core/platform/] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA. To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

I wasn’t sure what to do with it, and ran my application ( GitHub - Ipomoeabatatas/TiHar ).
The app was suppose to identify changing human action in a video clip with labels constantly over it.
As I run it, I get the error below.

2022-01-14 08:53:01.702 InMemoryFileManager: Missing file c8badebc9f2aac3c6482116046c4fb4d6747832688fbfbff4ee59767.jpeg

I suspect it has something to do with the tensorflow installation error message.

Any hints to resolve this will be tremendously appreciated.

It is not related with tensorflow but with with the rendering of the image. I assume you have somewhere a st.image(some_numpy_image) which is causing the InMemoryFileManager error. How did you deploy it? I deployed a streamlit app to Google Cloud Run (serverless) and was having the exact same problem that you are having, unfortunately couldn’t manage to solve it. It seems that (at least with Cloud run) different machines can be spawn so the image is generated in one machine and other tries to serve it, see this same issue: MediaFileManager: Missing file on Google App Engine · Issue #3334 · streamlit/streamlit · GitHub
I manage to solve it by deploying it to just a single machine.
After a lot of trying it was also solved in Cloud Run by setting Maximum requests per container to a high value and vCPU=1
Another ugly option it worked for me before finding the other solution was by uploading the image you want to render to a persistent storage (like GCP Cloud storage) and return the URL to it instead of the numpy array.


Thanks for the reply.

I think you are absolutely right that this is not a Tensorflow problem.
Yes, I am using a st.image on a frame that was extracted using a Video using CV2.
I’ve depoy to Streamlit Cloud and Heroku and get the same dismay results.

Let me try out the workaround that you are suggesting !