My Streamlit is dead when read parquet file

Hi.

Iโ€™m using streamlit with docker file
Docker build is great. So i need to testing in my localhost
And local host run is goood.
But When read_parquet file then docker images dead and localhost:8501 is too.
Whatโ€™s the matter?

This is my main.py file

import streamlit as st
import pandas as pd


def main():
    
    st.set_page_config(
        page_title="Demo",
        initial_sidebar_state="auto",
        page_icon="๐Ÿ‘‹",
    )

    st.write("# Demo Page! ๐Ÿ‘‹")

    try:
        data = pd.read_parquet('flat_testing.parquet')
        st.write(data['_0'][0])
    except Exception as e:
        st.write("An error occurred:")
        st.write(e)
        # Optionally, print the error to the console as well
        print(e)
     
if __name__ == '__main__':
    main()

And this is my dockerfile

# Use the Python 3.9 slim image

FROM python:3.9-slim

WORKDIR /app

RUN apt-get update && apt-get install -y gcc python3-dev wget && apt-get clean && rm -rf /var/lib/apt/lists/*

COPY requirements.txt requirements.txt

RUN pip install --upgrade pip && pip install -r requirements.txt

RUN wget https://flat_testing.parquet -O flat_testing.parquet

COPY . .

CMD ["streamlit", "run", "main.py"]

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.