Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +16 -21
Dockerfile
CHANGED
|
@@ -1,31 +1,26 @@
|
|
| 1 |
# Dockerfile
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
|
| 11 |
-
ENV HOME=/app
|
| 12 |
-
ENV XDG_CACHE_HOME=/app/.cache
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
#
|
| 18 |
-
# 3. Grant the Hugging Face user (UID 1000) full ownership of both the app
|
| 19 |
-
# directory and the internal LiteLLM package paths
|
| 20 |
-
RUN mkdir -p /app/.cache \
|
| 21 |
-
&& mkdir -p /usr/lib/python3.13/site-packages/litellm/proxy/_experimental/out \
|
| 22 |
-
&& chown -R 1000:1000 /app \
|
| 23 |
-
&& chown -R 1000:1000 /usr/lib/python3.13/site-packages/litellm
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
|
| 27 |
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
CMD ["--config", "/app/
|
|
|
|
| 1 |
# Dockerfile
|
| 2 |
+
FROM docker.litellm.ai/berriai/litellm:main-stable
|
| 3 |
|
| 4 |
+
# Hugging Face Spaces expects the app to listen on 7860
|
| 5 |
+
ENV PORT=7860
|
| 6 |
|
| 7 |
+
# Free CPU Spaces + Supabase free tier => keep this conservative
|
| 8 |
+
ENV NUM_WORKERS=1
|
| 9 |
|
| 10 |
+
# Apply Prisma migrations automatically on startup (recommended for prod)
|
| 11 |
+
ENV USE_PRISMA_MIGRATE=True
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
# Make the root URL go to the Admin UI, and move Swagger to /docs
|
| 14 |
+
ENV DOCS_URL=/docs
|
| 15 |
+
ENV ROOT_REDIRECT_URL=/ui
|
| 16 |
|
| 17 |
+
# Optional: cleaner logs
|
| 18 |
+
# ENV JSON_LOGS=True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
# Copy a minimal config (no secrets inside)
|
| 21 |
+
COPY litellm_config.yaml /app/config.yaml
|
| 22 |
|
| 23 |
EXPOSE 7860
|
| 24 |
|
| 25 |
+
# Base image entrypoint runs litellm; CMD supplies args
|
| 26 |
+
CMD ["--config", "/app/config.yaml", "--host", "0.0.0.0"]
|