File size: 631 Bytes
136c0f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1b08971
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Use lightweight Python 3.12 image
FROM python:3.12-slim

WORKDIR /app

# Install Nmap just so the Python library imports don't crash the server
RUN apt-get update && apt-get install -y nmap && rm -rf /var/lib/apt/lists/*

# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy all your code
COPY . .

# Hugging Face exposes port 7860
EXPOSE 7860

# --- THE FIX: 1 Worker, 8 Threads ---
# This stops race conditions where multiple workers try to create the SQLite DB at the same time
CMD ["gunicorn", "--workers", "1", "--threads", "8", "-b", "0.0.0.0:7860", "wsgi:app"]