-
Stefy Lanza (nextime / spora ) authored
Live on zeiss, /v1/audio/generate answered in 0.25s with "ACE-Step requirements missing", which was not the problem: the venv was there and imported fine by hand in the same container. The container's per-engine launchers export PYTHONHOME=/opt/coderai/python (the standalone 3.13); PID 1 and an interactive docker exec do not. A 3.12 interpreter inheriting it aborts before running a byte -- "Current thread ... <no Python frame>" -- so the worker's import probe failed instantly, and the caller went down the rebuild path to report a missing file instead. Reproduced both ways before changing anything. longcat_worker had already solved this for its 3.10 venv, behind a docstring saying coderai does not set those variables. It does. The helper is shared now (codai/api/venv_env), longcat delegates to it, and every ACE-Step spawn -- probe, both venv-creation routes, the install, the service -- goes through it. The probe also prints what the child said rather than returning a bare False. Then response_format: declared as url | b64_wav | b64_mp3, and ignored. The response was chosen by whether a file directory was configured, so a client asking for base64 silently got a URL -- the same bug /v1/images had with b64_json. Honoured now, and b64_mp3 is really encoded, because base64 of a wav under an mp3 key is a decode failure at the client. Also corrected in passing: versions.env pins UBUNTU_VERSION=24.04, whose system python IS 3.12, so the baked venv needs no bundled interpreter. The Dockerfile rewrote pyvenv.cfg at /opt/coderai/py312 unconditionally, which would have broken a working venv when nothing was bundled there, and the build refused outright without a relocatable 3.12 it did not need. Verified live after the fix: b64_wav returns 5,742,296 bytes (~15s of 48 kHz stereo), eviction by a 21 GB model stopped the worker and took the GPU from 7958 MiB to 274 MiB in under four seconds, and ACE-Step then reloaded and generated again. Suite at its 15-failure baseline, 5299 passed. Co-Authored-By:
Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014T3rZnLhydX9QqUcfBbqLu
4b223f7b