Spaces:
Runtime error
Runtime error
MiniMax Agent commited on
Commit ·
7ae4b71
1
Parent(s): 44ffe48
Update Dockerfile to use app_v4 with background model loading
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# OpenELM API Docker Configuration
|
| 2 |
-
#
|
| 3 |
|
| 4 |
FROM python:3.10-slim
|
| 5 |
|
|
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 10 |
pkg-config \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Install SentencePiece (required for
|
| 14 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 15 |
libsentencepiece-dev \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
|
@@ -43,5 +43,5 @@ COPY --chown=user . /app
|
|
| 43 |
# Expose the API port
|
| 44 |
EXPOSE 8000 7860
|
| 45 |
|
| 46 |
-
# Set default command
|
| 47 |
-
CMD ["uvicorn", "
|
|
|
|
| 1 |
# OpenELM API Docker Configuration
|
| 2 |
+
# Version 4: Background model loading to prevent timeout
|
| 3 |
|
| 4 |
FROM python:3.10-slim
|
| 5 |
|
|
|
|
| 10 |
pkg-config \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Install SentencePiece (required for tokenizer)
|
| 14 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 15 |
libsentencepiece-dev \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 43 |
# Expose the API port
|
| 44 |
EXPOSE 8000 7860
|
| 45 |
|
| 46 |
+
# Set default command - NOW USING app_v4 which has background loading!
|
| 47 |
+
CMD ["uvicorn", "app_v4:app", "--host", "0.0.0.0", "--port", "8000", "--timeout-keep-alive", "120", "--log-level", "info"]
|