I am developing a multi-page dash application. I have ran the application on my local machine, as well as on a Vagrant VM using port forwarding and both have worked seamlessly. However, when I go to containerize my application using Docker and run it in the VM, several callbacks on the initial page fire twice on page load causing the app to not render. I’ve added allow_duplicate=True on these callbacks and still the app won’t load. I’m serving the layout using the technique:
`
def serve_layout()
// content
layout = serve_layout
`
This is the Dockerfile used to build the image:
`FROM python:3.9.6
RUN mkdir -p /app
COPY . /app
WORKDIR /app
ENV PIP_CERT=certs_path
RUN pip --timeout=1000 install -r requirements.txt
WORKDIR /app/src
CMD [“python”, “sitrep.py”]`
Here is my main file:
app = Dash(__name__, use_pages=True, suppress_callback_exceptions=True)
app.layout = html.Div([dash.page_container])
if __name__ == ‘__main__’:
app.run(debug=True,host=‘0.0.0.0’,use_reloader=False)
I’m running Dash 2.13.0 with python 3.9.6.