commit
32a36cceff
444 files changed
+67186
No files matched your search
@@ -0,0 +1,24 @@
|
||||
FROM python:3.9-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
# Copy dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Pre-download the Hugging Face embedding model during Docker build phase
|
||||
# so it is baked into the image and does not need internet to start
|
||||
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')"
|
||||
|
||||
# Copy source code and vector DB
|
||||
COPY . .
|
||||
|
||||
# Set offline environment variables
|
||||
ENV HF_HUB_OFFLINE=1
|
||||
ENV TRANSFORMERS_OFFLINE=1
|
||||
ENV RAG_PORT=5002
|
||||
|
||||
EXPOSE 5002
|
||||
|
||||
CMD ["python", "rag_service.py"]
|
||||
Reference in new issue
Block a user