Spaces:
Build error
Build error
File size: 787 Bytes
0c6428a | 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 | FROM python:3.10-slim
# Install build tools
RUN apt-get update && apt-get install -y build-essential python3-dev && rm -rf /var/lib/apt/lists/*
# Setup user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Install requirements
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create model folder
RUN mkdir -p $HOME/app/models
# Expose HF port
EXPOSE 7860
# This command runs Llama 3.2 1B (Fast on CPU)
# and sets an API Key for security
CMD ["python3", "-m", "llama_cpp.server", \
"--model", "hf://bartowski/Llama-3.2-1B-Instruct-GGUF/Llama-3.2-1B-Instruct-Q4_K_M.gguf", \
"--host", "0.0.0.0", \
"--port", "7860", \
"--api_key", "my_secret_agent_key"] |