SheildSense_API_SDK / Dockerfile
cloud450's picture
Upload 48 files
4afcb3a verified
raw
history blame contribute delete
643 Bytes
# 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"]