Spaces:
Sleeping
Sleeping
File size: 643 Bytes
4afcb3a | 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 | # Production Dockerfile for AI Firewall
# Optimized for Hugging Face Spaces (Gradio)
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements from root
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy everything else
COPY . .
# Set environment variables
ENV FIREWALL_BLOCK_THRESHOLD=0.70
ENV FIREWALL_FLAG_THRESHOLD=0.40
ENV FIREWALL_USE_EMBEDDINGS=false
ENV PYTHONUNBUFFERED=1
# Hugging Face Spaces port
EXPOSE 7860
# Run the Gradio App
CMD ["python", "app.py"]
|