fix: remover emojis do Dockerfile para evitar warning de Unicode

- Substituir 1️⃣, 2️⃣, etc por 1., 2., etc
- Evita falsos positivos de caracteres invisíveis no Gitea
This commit is contained in:
CM Consultor
2026-08-06 22:14:57 +00:00
parent f93d2fcd45
commit d47e3eb314

View File

@@ -14,10 +14,10 @@
# • A tiny wrapper entrypoint that runs `litellm --config /app/config.yaml` # • A tiny wrapper entrypoint that runs `litellm --config /app/config.yaml`
# --------------------------------------------------------------- # ---------------------------------------------------------------
# 1️⃣ Use the official LiteLLM image (based on python:3.12‑slim) # 1. Use the official LiteLLM image (based on python:3.12-slim)
FROM litellm/litellm:latest AS base FROM litellm/litellm:latest AS base
# 2️⃣ Set environment variables that control the router # 2. Set environment variables that control the router
ENV \ ENV \
# Port the proxy will expose (match docker‑compose) # Port the proxy will expose (match docker‑compose)
PORT=4000 \ PORT=4000 \
@@ -28,16 +28,16 @@ ENV \
TOOL_ROUTER_ALWAYS_INCLUDE=get_time,help,list_tools \ TOOL_ROUTER_ALWAYS_INCLUDE=get_time,help,list_tools \
TOOL_ROUTER_EMBEDDING_MODEL=text-embedding-3-small TOOL_ROUTER_EMBEDDING_MODEL=text-embedding-3-small
# 3️⃣ Create a non‑root user (optional but recommended) # 3. Create a non-root user (optional but recommended)
RUN useradd -m litellm && \ RUN useradd -m litellm && \
mkdir -p /app && \ mkdir -p /app && \
chown litellm:litellm /app chown litellm:litellm /app
# 4️⃣ Switch to that user for the rest of the steps # 4. Switch to that user for the rest of the steps
USER litellm USER litellm
WORKDIR /app WORKDIR /app
# 5️⃣ Copy only the files that belong to the Tool Router # 5. Copy only the files that belong to the Tool Router
# (keeps the image lean – we don’t copy .git, docs, etc.) # (keeps the image lean – we don’t copy .git, docs, etc.)
COPY --chown=litellm:litellm \ COPY --chown=litellm:litellm \
tool_router_logger.py \ tool_router_logger.py \
@@ -46,18 +46,18 @@ COPY --chown=litellm:litellm \
requirements.txt \ requirements.txt \
./ ./
# 6️⃣ Install the extra Python deps that the router needs: # 6. Install the extra Python deps that the router needs:
# – numpy (for cosine similarity) # – numpy (for cosine similarity)
# – scikit‑learn (for the Jaccard fallback) # – scikit‑learn (for the Jaccard fallback)
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# 7️⃣ Expose the port used by LiteLLM # 7. Expose the port used by LiteLLM
EXPOSE 4000 EXPOSE 4000
# 8️⃣ Healthcheck – LiteLLM returns a JSON “health” endpoint # 8. Healthcheck - LiteLLM returns a JSON "health" endpoint
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD curl -fsS "http://127.0.0.1:${PORT}/health" || exit 1 CMD curl -fsS "http://127.0.0.1:${PORT}/health" || exit 1
# 9️⃣ Default command – run the proxy with our config file # 9. Default command - run the proxy with our config file
# The official image’s entrypoint is preserved, we just pass the config. # The official image’s entrypoint is preserved, we just pass the config.
CMD ["sh", "-c", "litellm --config /app/config.yaml --port ${PORT} --host 0.0.0.0"] CMD ["sh", "-c", "litellm --config /app/config.yaml --port ${PORT} --host 0.0.0.0"]