gguf-translate / Dockerfile
Nekochu's picture
Init
87a5b6f verified
Raw
History Blame Contribute Delete
941 Bytes
FROM python:3.10-slim
# Install dependencies (procps for pkill when switching models)
RUN apt-get update && apt-get install -y \
curl wget libgomp1 procps \
&& rm -rf /var/lib/apt/lists/*
# Download prebuilt llama.cpp
RUN mkdir -p /opt/llama && \
wget -q https://github.com/ggml-org/llama.cpp/releases/download/b7789/llama-b7789-bin-ubuntu-x64.tar.gz -O /tmp/llama.tar.gz && \
tar -xzf /tmp/llama.tar.gz -C /opt/llama --strip-components=1 && \
chmod +x /opt/llama/* && \
rm /tmp/llama.tar.gz
ENV PATH="/opt/llama:$PATH"
ENV LD_LIBRARY_PATH="/opt/llama:$LD_LIBRARY_PATH"
# Install Python packages (hf_xet for 10x faster downloads, lingua for auto lang detect)
RUN pip install --no-cache-dir gradio huggingface-hub hf_xet requests lingua-language-detector
# App files
WORKDIR /app
COPY app.py start.sh ./
RUN chmod +x start.sh
# Create models directory
RUN mkdir -p /models
EXPOSE 7860
CMD ["bash", "start.sh"]