job "salience-editor-api" { datacenters = ["ord10"] type = "service" constraint { attribute = "${node.unique.name}" value = "mac-mini" } group "app" { count = 1 network { mode = "host" port "http" { # Nomad will assign an available port } } update { max_parallel = 1 health_check = "checks" min_healthy_time = "10s" healthy_deadline = "5m" auto_promote = true auto_revert = true canary = 1 } task "waitress-server" { driver = "raw_exec" #user = "nomad" config { work_dir = "$RELEASE_PATH" command = "/Users/nomad/.local/bin/uv" # Waitress is single-process (no fork), avoiding Metal/MPS issues on macOS args = ["run", "waitress-serve", "--listen=10.77.0.2:${NOMAD_PORT_http}", "--listen=127.0.0.1:${NOMAD_PORT_http}", "salience:app"] } env { PORT = "${NOMAD_PORT_http}" ORIGIN = "https://peoplesgrocers.com" #PATH = "/Users/nomad/.local/bin:/usr/local/bin:/usr/bin:/bin" HOME = "/Users/nomad" UV_CACHE_DIR = "/Users/nomad/.cache/uv" HF_HOME = "/Users/nomad/cache-huggingface" NLTK_DATA = "/Users/nomad/cache-nltk" #TORCH_DEVICE = "cpu" # Force CPU since chicago-web01 has no GPU } # Release path set during deployment via envsubst template { data = <