This commit is contained in:
2026-03-16 16:08:57 -03:00
parent 6635c861c8
commit 847d3bd384
6 changed files with 590 additions and 15 deletions

View File

@@ -10,10 +10,10 @@ RUN apt-get update && \
WORKDIR /app
# Install PyTorch with ROCm support first (big layer, cache it)
# Install PyTorch (CPU-only for Docker build - will use GPU at runtime if available)
RUN pip install --no-cache-dir \
torch torchvision torchaudio \
--index-url https://download.pytorch.org/whl/nightly/rocm7.2/
--index-url https://download.pytorch.org/whl/cpu
# Install remaining Python dependencies
COPY app/requirements.txt .
@@ -22,12 +22,6 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app/ .
# Pre-download the embedding model at build time so startup is fast
RUN python -c "\
from sentence_transformers import SentenceTransformer; \
m = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2'); \
print('Model cached:', m.encode(['test']).shape)"
EXPOSE 8899
VOLUME ["/app/data", "/app/logs"]