Skip to content

Commit 5ccc4e6

Browse files
committed
fix(jetson): align healthcheck and entrypoint API port fallback
Use nested fallback ${API_PORT:-${ACESTEP_API_PORT:-8001}} in both the HEALTHCHECK and entrypoint so the probe and server always resolve the same port regardless of which env var is set.
1 parent b50caf8 commit 5ccc4e6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Dockerfile.jetson

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ EXPOSE 7860 8001
281281
# Lightweight probe: the Gradio or API server must be listening.
282282
HEALTHCHECK --interval=60s --timeout=10s --start-period=120s --retries=3 \
283283
CMD curl -sf http://localhost:${GRADIO_PORT:-7860}/ > /dev/null 2>&1 \
284-
|| curl -sf http://localhost:${API_PORT:-8001}/health > /dev/null 2>&1 \
284+
|| curl -sf http://localhost:${API_PORT:-${ACESTEP_API_PORT:-8001}}/health > /dev/null 2>&1 \
285285
|| exit 1
286286

287287
# ==================== Entrypoint ====================
@@ -316,10 +316,10 @@ if [ "${ACESTEP_INIT_SERVICE:-true}" = "true" ]; then
316316
fi
317317

318318
if [ "${ACESTEP_MODE}" = "api" ]; then
319-
echo "Starting REST API server on 0.0.0.0:${ACESTEP_API_PORT:-8001} ..."
319+
echo "Starting REST API server on 0.0.0.0:${API_PORT:-${ACESTEP_API_PORT:-8001}} ..."
320320
exec python -m acestep.api_server \
321321
--host "${ACESTEP_API_HOST:-0.0.0.0}" \
322-
--port "${ACESTEP_API_PORT:-8001}" \
322+
--port "${API_PORT:-${ACESTEP_API_PORT:-8001}}" \
323323
${ACESTEP_EXTRA_ARGS:-}
324324
else
325325
echo "Starting Gradio UI on 0.0.0.0:${GRADIO_PORT:-7860} ..."

0 commit comments

Comments
 (0)