RAG_Eval / Dockerfile
Rom89823974978's picture
Updated dockerfile, run.sh and readme file to fit with hugginggface space
ce9fe2d
# syntax=docker/dockerfile:1
########################
# 1. Runtime stage
########################
FROM python:3.10-slim AS runtime
# ── Environment hygiene ────────────────────────────────────────────────────
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
# Streamlit: suppress browser launch & telemetry inside container
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
STREAMLIT_SERVER_HEADLESS=true
# ── System deps ────────────────────────────────────────────────────────────
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git build-essential \
openjdk-17-jre-headless \
curl \
&& rm -rf /var/lib/apt/lists/*
# ── Python deps ────────────────────────────────────────────────────────────
WORKDIR /app
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt \
&& pip install streamlit
# ── Project code ──────────────────────────────────────────────────────────
COPY . .
# ── Default entrypoint β†’ Streamlit dashboard ─────────────────────────────
EXPOSE 8501
ENTRYPOINT ["streamlit", "run", "scripts/dashboard.py", "--server.port", "8501", "--server.address", "0.0.0.0"]
########################
# 2. Dev / CI stage
########################
FROM runtime AS dev
# Extra tooling for development & CI
RUN pip install \
black isort flake8 pytest \
mkdocs-material
# Default to an interactive shell
CMD ["/bin/bash"]
###########################################################################
# Build / run cheat-sheet #
# ----------------------------------------------------------------------- #
# Production container (dashboard): #
# docker build -t rag-eval . #
# docker run -p 8501:8501 rag-eval #
# #
# Alternative CLI usage: #
# docker run --rm rag-eval python scripts/run_experiments.py --help #
# #
# Development container (with lint/test/docs tools): #
# docker build -t rag-eval-dev --target dev . #
# docker run --rm -it rag-eval-dev #
###########################################################################