-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathContainerfile
More file actions
31 lines (21 loc) · 931 Bytes
/
Containerfile
File metadata and controls
31 lines (21 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.13-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
TRANSFORMERS_CACHE=/root/.cache/huggingface
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ cmake git \
libvulkan1 libvulkan-dev vulkan-tools glslang-tools glslc \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir uv
COPY pyproject.toml README.md LICENSE ./
RUN mkdir -p src/cordon && touch src/cordon/__init__.py
RUN CMAKE_ARGS="-DGGML_VULKAN=on" \
uv pip install --system ".[llama-cpp]"
COPY src/ ./src/
RUN uv pip install --system --no-deps .
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')" && \
python -c "from huggingface_hub import hf_hub_download; hf_hub_download('second-state/All-MiniLM-L6-v2-Embedding-GGUF', 'all-MiniLM-L6-v2-Q4_K_M.gguf')"
WORKDIR /logs
ENTRYPOINT ["cordon"]
CMD ["--help"]