1 / Dockerfile
rkihacker's picture
Update Dockerfile
c24167d verified
raw
history blame
550 Bytes
# -------------------------------------------------
# Use the official HF Python image (includes sudo)
# -------------------------------------------------
FROM python:3.12-slim
WORKDIR /app
# Install only what we need
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY main.py .
EXPOSE 8000
# Raw sockets need CAP_NET_RAW + CAP_NET_ADMIN
# Hugging Face Spaces runs containers with --cap-add automatically,
# but for local testing add them manually.
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]