FarmIQ is a data-driven solution designed to help farmers make better decisions related to crop health, water management, and yield quality using NASA MERRA-2 satellite data.
- Prerequisites
- Installation
- Running the Application Locally
- Running the Application with Docker
- Folder Structure
- License
Before you begin, ensure you have the following installed on your local machine:
- Python 3.8+ (Download Python)
- pip (Python package installer, comes with Python)
- Git (Download Git)
- Docker (Install Docker) required if running with Docker
git clone https://github.com/tramya16/nasa_hackathon.git
cd nasa_hackathon# Set up a virtual environment (optional but recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the required Python packages
pip install -r requirements.txtTo run the application without Docker:
- Ensure all dependencies are installed via
requirements.txt. - Run the Flask app:
export FLASK_APP=app.py # On Windows: set FLASK_APP=app.py flask run
The app should now be running on http://127.0.0.1:8080/.
To run the application using Docker:
In the project directory (where your Dockerfile is located), run the following command to build the Docker image:
docker build -t flask-app .Once the image is built, you can run the application inside a Docker container:
docker run -d -p 8081:8080 flask-app-d: Runs the container in detached mode (in the background).-p 8081:8080: Maps port 8000 on your machine to port 8081 in the container, allowing you to access the Flask app viahttp://localhost:8081.
The Flask app should be accessible at http://localhost:8081/.
To stop the running container, first find the container ID by using:
docker psThen, stop the container with:
docker stop <container-id>To view the logs from your Docker container, use the following command:
docker logs <container-id>nasa_hackathon/
│
├── app.py # Main Flask application
├── templates/ # HTML templates for Flask
├── static/ # Static assets (CSS, JS, images)
├── Dockerfile # Docker configuration file
├── combined_europe_data_Test1.zip # Example of large file
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .gitattributes # Git LFS tracked files configuration