SciPaths-Demo / Dockerfile
Beanbagdzf's picture
Upload folder using huggingface_hub
f329675 verified
Raw
History Blame Contribute Delete
1.03 kB
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
STREAMLIT_SERVER_HEADLESS=true \
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
PLAYWRIGHT_BROWSERS_PATH=/app/.playwright \
HOME=/tmp
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
COPY hf_space/requirements.txt /app/hf_space/requirements.txt
RUN python -m pip install --upgrade pip && \
pip install -r requirements.txt
# Chromium for SciPath Live Run (websearch_deep crawl tool).
RUN mkdir -p /app/.playwright && \
python -m playwright install --with-deps chromium
COPY . /app
# HF Space secrets (GEMINI_API_KEY, etc.) are injected as env vars at runtime.
EXPOSE 7860
CMD ["streamlit", "run", "hf_space/streamlit_app.py", \
"--server.address", "0.0.0.0", \
"--server.port", "7860", \
"--browser.gatherUsageStats", "false"]