Spaces:
Paused
Paused
Download Dockerfile from SuhasGholkar/bot: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/spaces/SuhasGholkar/bot/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/SuhasGholkar/bot/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SuhasGholkar/bot/resolve/main/Dockerfile
1.57 kB
| # ----------------------------- | |
| # Base Image | |
| # ----------------------------- | |
| FROM python:3.10-slim | |
| # ----------------------------- | |
| # Set working directory | |
| # ----------------------------- | |
| WORKDIR /app | |
| # Cache to writable, persistent volume | |
| ENV HF_HOME=/data/hf-cache \ | |
| HF_HUB_CACHE=/data/hf-cache/hub \ | |
| TRANSFORMERS_CACHE=/data/hf-cache/transformers \ | |
| HF_HUB_DISABLE_SYMLINKS_WARNING=1 | |
| RUN mkdir -p /data/hf-cache/hub /data/hf-cache/transformers | |
| # ----------------------------- | |
| # Install system dependencies | |
| # ----------------------------- | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libffi-dev \ | |
| sqlite3 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ----------------------------- | |
| # Install Python dependencies | |
| # ----------------------------- | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Ensure data dir exists (mounted at runtime ideally) | |
| RUN mkdir -p /data /data/rag_store | |
| ENV RAG_BACKEND=CHROMA \ | |
| RAG_DIR=/data/rag_store \ | |
| RAG_COLLECTION=olist_sql_exemplars \ | |
| OPENAI_EMBED_MODEL=text-embedding-3-small | |
| # ----------------------------- | |
| # Copy app files | |
| # ----------------------------- | |
| COPY . . | |
| # ----------------------------- | |
| # Ensure persistent storage dir | |
| # ----------------------------- | |
| RUN mkdir -p /data | |
| # ----------------------------- | |
| # Expose Streamlit Port | |
| # ----------------------------- | |
| EXPOSE 7860 | |
| # ----------------------------- | |
| # Default run command | |
| # ----------------------------- | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |