Spaces:
Running
Running
XQ commited on
Commit ·
2408f3f
1
Parent(s): 9b053cd
Update Docker file
Browse files- Dockerfile.spaces → Dockerfile.compose +6 -18
- docker-compose.yml +6 -2
Dockerfile.spaces → Dockerfile.compose
RENAMED
|
@@ -2,9 +2,9 @@ FROM python:3.11-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# ---------- System packages
|
| 6 |
RUN apt-get update && \
|
| 7 |
-
apt-get install -y --no-install-recommends
|
| 8 |
rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# ---------- Python dependencies -----------------------------------------------
|
|
@@ -20,21 +20,9 @@ from sentence_transformers import SentenceTransformer, CrossEncoder; \
|
|
| 20 |
SentenceTransformer('paraphrase-multilingual-MiniLM-L12-v2'); \
|
| 21 |
CrossEncoder('cross-encoder/mmarco-mMiniLMv2-L12-H384-v1')"
|
| 22 |
|
| 23 |
-
# ----------
|
| 24 |
-
|
| 25 |
-
QDRANT_URL="" \
|
| 26 |
-
EMBEDDING_PROVIDER=local \
|
| 27 |
-
LLM_PROVIDER=google_genai \
|
| 28 |
-
API_BASE_URL=http://localhost:8000
|
| 29 |
-
RUN python -m scripts.ingest
|
| 30 |
|
| 31 |
-
|
| 32 |
-
RUN rm /etc/nginx/sites-enabled/default
|
| 33 |
-
COPY nginx.spaces.conf /etc/nginx/conf.d/default.conf
|
| 34 |
|
| 35 |
-
|
| 36 |
-
COPY supervisord.spaces.conf /etc/supervisor/conf.d/supervisord.conf
|
| 37 |
-
|
| 38 |
-
EXPOSE 7860
|
| 39 |
-
|
| 40 |
-
CMD ["supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# ---------- System packages (curl for Qdrant health check) -------------------
|
| 6 |
RUN apt-get update && \
|
| 7 |
+
apt-get install -y --no-install-recommends curl && \
|
| 8 |
rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# ---------- Python dependencies -----------------------------------------------
|
|
|
|
| 20 |
SentenceTransformer('paraphrase-multilingual-MiniLM-L12-v2'); \
|
| 21 |
CrossEncoder('cross-encoder/mmarco-mMiniLMv2-L12-H384-v1')"
|
| 22 |
|
| 23 |
+
# ---------- Entrypoint --------------------------------------------------------
|
| 24 |
+
RUN chmod +x scripts/docker-entrypoint.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
EXPOSE 8000
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
CMD ["bash", "scripts/docker-entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker-compose.yml
CHANGED
|
@@ -34,7 +34,9 @@ services:
|
|
| 34 |
- local
|
| 35 |
|
| 36 |
api:
|
| 37 |
-
build:
|
|
|
|
|
|
|
| 38 |
ports:
|
| 39 |
- "8000:8000"
|
| 40 |
env_file:
|
|
@@ -48,7 +50,9 @@ services:
|
|
| 48 |
- ./docs:/app/docs
|
| 49 |
|
| 50 |
ui:
|
| 51 |
-
build:
|
|
|
|
|
|
|
| 52 |
ports:
|
| 53 |
- "8501:8501"
|
| 54 |
env_file:
|
|
|
|
| 34 |
- local
|
| 35 |
|
| 36 |
api:
|
| 37 |
+
build:
|
| 38 |
+
context: .
|
| 39 |
+
dockerfile: Dockerfile.compose
|
| 40 |
ports:
|
| 41 |
- "8000:8000"
|
| 42 |
env_file:
|
|
|
|
| 50 |
- ./docs:/app/docs
|
| 51 |
|
| 52 |
ui:
|
| 53 |
+
build:
|
| 54 |
+
context: .
|
| 55 |
+
dockerfile: Dockerfile.compose
|
| 56 |
ports:
|
| 57 |
- "8501:8501"
|
| 58 |
env_file:
|