somAI-backend / Dockerfile
arshenoy's picture
Update Dockerfile
075f7f4 verified
raw
history blame contribute delete
593 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies (Only build tools needed for Llama.cpp)
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
libopenblas-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
# Optimize Llama.cpp build for CPU
ENV CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS"
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . .
# Expose port 7860 for Hugging Face Spaces
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]