Aara / Dockerfile
chandrashekar8
issues fixed in three files
5339750
Raw
History Blame Contribute Delete
3.46 kB
# ═══════════════════════════════════════════════════════════════
# AARA Voice Agent β€” Dockerfile
# Sahara Star Hotels Multilingual Voice Concierge
# CPU-only Β· HuggingFace Spaces
# ═══════════════════════════════════════════════════════════════
FROM python:3.10-slim
LABEL maintainer="AARA Project"
LABEL description="AARA Multilingual Voice Agent β€” Sahara Star Hotels"
LABEL version="2.0.0"
# ── System dependencies ────────────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
cmake \
make \
ffmpeg \
espeak-ng \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# ── Working directory ──────────────────────────────────────────
WORKDIR /app
# ── Python dependencies ────────────────────────────────────────
# Build llama-cpp-python from source so it links against glibc
# (python:3.10-slim is Debian/glibc; pre-built wheels on abetlen's index
# are compiled for Alpine/musl and will fail with libllama.so errors).
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
RUN CMAKE_ARGS="-DLLAMA_BLAS=OFF" FORCE_CMAKE=1 \
pip install --no-cache-dir llama-cpp-python==0.2.90 \
--no-binary llama-cpp-python
COPY requirements.txt .
RUN pip install --no-cache-dir \
--default-timeout=600 \
-r requirements.txt
# ── Application code ──────────────────────────────────────────
COPY voice_agent_standalone.py .
COPY web_app.py .
COPY create_hotel_database.py .
COPY download_models.py .
COPY reference_audio ./reference_audio
# ── Create directories ─────────────────────────────────────────
RUN mkdir -p models output_audio logs cache
# ── Pre-download models at build time ─────────────────────────
# This bakes the models into the image so the first request is
# fast. Set SKIP_MODEL_DOWNLOAD=1 to skip during local builds.
ARG SKIP_MODEL_DOWNLOAD=0
RUN if [ "$SKIP_MODEL_DOWNLOAD" = "0" ]; then python download_models.py; fi
# ── Environment ───────────────────────────────────────────────
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV AARA_MODELS_DIR=/app/models
ENV HF_HOME=/app/cache/hf
# Pre-trust snakers4/silero-vad so torch.hub never prompts stdin
ENV TORCH_HOME=/app/cache/torch
ENV TRUST_REPO=1
# ── Expose web app port ───────────────────────────────────────
EXPOSE 7860
# ── Entrypoint β€” single worker, CPU inference ─────────────────
CMD ["uvicorn", "web_app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]