Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -20
Dockerfile
CHANGED
|
@@ -1,37 +1,26 @@
|
|
| 1 |
-
# ==================== Dockerfile for Hybrid Memory Graph RAG ====================
|
| 2 |
FROM python:3.12-slim
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
# Install system dependencies
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
-
build-essential \
|
| 9 |
-
curl \
|
| 10 |
-
git \
|
| 11 |
-
libpq-dev \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
# Copy requirements first (better caching)
|
| 15 |
COPY requirements.txt .
|
|
|
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
RUN pip install --no-cache-dir --upgrade pip && \
|
| 19 |
-
pip install --no-cache-dir -r requirements.txt
|
| 20 |
-
|
| 21 |
-
# Download spaCy model
|
| 22 |
RUN python -m spacy download en_core_web_sm
|
| 23 |
|
| 24 |
-
# Copy application code
|
| 25 |
COPY app.py .
|
| 26 |
|
| 27 |
-
# Create directory for persistent memory
|
| 28 |
RUN mkdir -p /app/user_memory
|
| 29 |
|
| 30 |
-
# Expose Streamlit port
|
| 31 |
EXPOSE 8501
|
| 32 |
|
| 33 |
-
#
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
+
build-essential curl git \
|
|
|
|
|
|
|
|
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
+
# Download spaCy
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
RUN python -m spacy download en_core_web_sm
|
| 14 |
|
|
|
|
| 15 |
COPY app.py .
|
| 16 |
|
|
|
|
| 17 |
RUN mkdir -p /app/user_memory
|
| 18 |
|
|
|
|
| 19 |
EXPOSE 8501
|
| 20 |
|
| 21 |
+
# IMPORTANT: Disable XSRF and CORS via command line (most reliable in Docker)
|
| 22 |
+
ENTRYPOINT ["streamlit", "run", "app.py", \
|
| 23 |
+
"--server.port=8501", \
|
| 24 |
+
"--server.address=0.0.0.0", \
|
| 25 |
+
"--server.enableXsrfProtection=false", \
|
| 26 |
+
"--server.enableCORS=false"]
|