GIN_MODE environment variable is ineffective

Description:

The GIN_MODE environment variable is ineffective in ollama because ollama overrides it here: https://github.com/jmorganca/ollama/blob/de5beb06b314eb4950c5a0de8183dfadb325fc8b/server/routes.go#L39-L56

The fix is to build as per, e.g.: https://github.com/jmorganca/ollama/blob/de5beb06b314eb4950c5a0de8183dfadb325fc8b/scripts/push_docker.sh#L5-L6. That is, add -X 'github.com/ollama/ollama/server.mode=release' to the linker flags. Once that's done the GIN_MODE environment variable can be removed from the service file.

Additional info:

Steps to reproduce:

  1. Install ollama.
  2. Start the ollama systemd service.
  3. Look at the journal logs for [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.