App to get data from government websites like USCIS and export control classifications
To install gov fetch you first need to create a .env file and fill out each of the entries:
# Clone the repository (if you haven't already)
git clone https://github.com/arunabhcode/gov-fetch.git
cd gov-fetch
# Copy template .env.example file and fill it out
cp .env.example .env
# Pull an Ollama model (replace <model_name> with the desired model)
./scripts/ollama_docker.sh pull <model_name>
# Run the installation script as root
sudo ./scripts/install.sh
The installation script will:
- Build the Docker image
- Copy files to /opt/gov-fetch
- Set up the systemd service
- Automatically detect if you have a GPU and use the appropriate profile
- Enable and start the service
Once installed, you can use these commands to manage Gov Fetch:
# Reload the systemd daemon (after making changes to service file)
sudo systemctl daemon-reload
# Check service status
sudo systemctl status gov-fetch
# View logs
sudo journalctl -u gov-fetch -f
# Start the service
sudo systemctl start gov-fetch
# Stop the service
sudo systemctl stop gov-fetch
# Restart the service
sudo systemctl restart gov-fetch
# Enable the service to start on boot
sudo systemctl enable gov-fetch
# Disable the service from starting on boot
sudo systemctl disable gov-fetch
The service automatically detects whether an NVIDIA GPU is available and selects the appropriate profile:
- If a GPU is detected (
nvidia-smi
is available and working), the GPU profile is used - If no GPU is detected, the CPU profile is used
No manual configuration is needed for GPU selection. The system will adapt automatically.
If you want to override the automatic detection:
- Create a systemd override:
sudo systemctl edit gov-fetch
- Add the following content to force a specific profile:
[Service]
Environment="COMPOSE_PROFILES=cpu" # or "COMPOSE_PROFILES=gpu"
ExecStartPre=
ExecStart=/usr/bin/docker compose -f ${GOVFETCH_DIR}/docker-compose.yml --profile ${COMPOSE_PROFILES} up
- Restart the service:
sudo systemctl restart gov-fetch
To completely remove Gov Fetch from your system:
# Run the uninstallation script as root
sudo ./scripts/uninstall.sh
The uninstallation script will:
- Stop and disable the service
- Remove the systemd service files
- Clean up Docker resources
- Remove the installation directory