A simple, illustrative Python application showcasing Solara's dashboard capabilities. This project, while functional, serves primarily as a learning tool to create and format a UI and is not intended for serious engineering use. 🚀
- Interactive UI for calculating the weight of a slab based on geometry and density. 📐
- Dynamic updates with Solara's reactive state management. 🌐
- For an in-depth exploration, visit my Flocode Substack newsletter. 📘
- Check out Flocode.dev for more coding resources for engineers. 💡
Note: This project is an example and should not replace professional engineering tools. 🛠️🚧
To install the necessary dependencies, run the following command in your terminal:
pip install -r requirements.txt
This command will install all the packages listed in the requirements.txt file, ensuring your application has all it needs to run properly.
Once you have dependencies installed, to start the Solara server and run the application, use:
solara run my_dashboard.py
This command will start a local server, typically accessible via a web browser at http://localhost:8765. Open this URL to interact with the application.
For those preferring a containerized environment, you can run the application using Docker. This is particularly useful for ensuring a consistent environment or when preparing for deployment.
First, build the Docker image for the application. In the root directory of the project, run:
docker build -t my_dashboard .
This command creates a Docker image named my_dashboard based on the instructions in the Dockerfile.
Running the Application in a Docker Container To run the application inside a Docker container, use:
docker run -p 4000:8765 my_dashboard
This command starts a Docker container from the my_dashboard image and maps port 8765 inside the container to port 4000 on your host machine.
Once the Docker container is running, access the Solara server by navigating to http://localhost:4000 in your web browser.
Please note that when running locally without Docker, the application is accessible at http://localhost:8765, while the Dockerized version is available at http://localhost:4000.