Spaces:
Paused
Paused
File size: 1,568 Bytes
100e6ce 1595d26 100e6ce 1595d26 be2560e 100e6ce 1595d26 be93f70 100e6ce 1595d26 100e6ce 1595d26 ee50919 100e6ce 1595d26 be93f70 100e6ce 1595d26 100e6ce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | # -----------------------------
# 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"]
|