fixes
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user