Deployment¶
Local Development¶
git clone https://github.com/Samuele95/computational-fields.git
cd computational-fields
pip install -e .
python app.py
The simulator will be available at http://localhost:7860.
Docker¶
Build and run with Docker:
Custom Port¶
Override the default port via the PORT environment variable:
Hugging Face Spaces¶
The project is deployed on Hugging Face Spaces using the Docker SDK.
Try it now -- the simulator is running live at huggingface.co/spaces/Sams995/computational-fields. No installation required.
Deploying Your Own Instance¶
- Create a new Space on Hugging Face with Docker SDK
- Push the repository:
- The Space will build automatically and serve the app on port 7860
Configuration¶
The README.md frontmatter (used by HF Spaces) can be customised:
---
title: Computational Fields Simulator
emoji: 🌐
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
---
Environment Variables¶
| Variable | Default | Description |
|---|---|---|
PORT |
7860 |
HTTP server port |
Requirements¶
The application requires Python 3.10+ and the following packages:
numpy >= 1.24matplotlib >= 3.7plotly >= 5.18pandas >= 2.0dash >= 2.15
All dependencies are listed in requirements.txt and installed automatically with pip install -e ..