St_pages not working in docker container

I created the following homepage that works on my host machine, but when I create a docker container, the st_pages doesn’t seem to work. It doesn’t throw an error - just does nothing. The plain old streamlit menu shows up. What could be the problem? Is there something else I need to install to get st_pages to work in the docker container?

import streamlit as st
from st_pages import Page, show_pages, hide_pages
import os

abs_path = os.path.abspath(__file__).strip("Home.py")

show_pages(
    [
        Page(os.path.join(abs_path, "Home.py"), "Home", "🏠"),
    ]
)

st.header("Home")

My Dockerfile

FROM python:3.12
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# copying my source code
COPY src /home/viz_tools
EXPOSE 8080
CMD streamlit run /home/viz_tools/Home.py --server.port=8080

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