docker/embeddings.Dockerfile hinzugefügt
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s
This commit is contained in:
parent
4a9d8ed501
commit
86600b0480
29
docker/embeddings.Dockerfile
Normal file
29
docker/embeddings.Dockerfile
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
FROM python:3.11-slim
|
||||
|
||||
ENV TRANSFORMERS_CACHE=/srv/.hf_cache \
|
||||
HF_HUB_DISABLE_TELEMETRY=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
# Optional: Systemlibs (meist nicht nötig, aber schadet nicht)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential git wget ca-certificates && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /srv
|
||||
|
||||
# 1) CPU-Torch fest aus CPU-Index (kleiner, ohne CUDA)
|
||||
RUN python -m pip install --upgrade pip && \
|
||||
pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cpu "torch==2.2.2"
|
||||
|
||||
# 2) Restliche Pakete (getrennt, damit torch nicht überschrieben wird)
|
||||
RUN pip install --no-cache-dir \
|
||||
fastapi==0.111.0 \
|
||||
uvicorn[standard]==0.30.1 \
|
||||
"sentence-transformers==3.0.1"
|
||||
|
||||
# App-Code in das Image (nur embed_server.py)
|
||||
COPY ../app/embed_server.py /srv/embed_server.py
|
||||
|
||||
EXPOSE 8990
|
||||
CMD ["uvicorn", "embed_server:app", "--host", "0.0.0.0", "--port", "8990"]
|
||||
Loading…
Reference in New Issue
Block a user