ExecChat / Dockerfile
guilsyTrue's picture
Copy evals/ into Docker image so the eval admin panel can import it
2fd1134
Raw
History Blame Contribute Delete
877 Bytes
FROM python:3.11-slim
# HF Spaces runs as user 1000
RUN useradd -m -u 1000 user
WORKDIR /app
# Install dependencies first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code (tools.py нужен только при ENABLE_TOOLS=1; при 0 не импортируется)
COPY app_2.py tools.py .
# In-app eval harness (admin panel «Проверка сценариев»)
COPY evals/ ./evals/
# Create writable dirs for FAISS cache (HF Spaces filesystem)
RUN mkdir -p /app/faiss_index && chown -R user:user /app
USER user
# Expose Streamlit default port
EXPOSE 7860
# HF Spaces expects port 7860
CMD ["streamlit", "run", "app_2.py", \
"--server.port=7860", \
"--server.address=0.0.0.0", \
"--server.headless=true", \
"--server.enableCORS=false", \
"--server.enableXsrfProtection=false"]