Blackbox / Dockerfile
Samfy001's picture
Upload 5 files
8754765 verified
raw
history blame contribute delete
595 Bytes
# Use Python 3.11 slim
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# System deps for building wheels if needed
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Install Python deps
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy app
COPY . .
# Hugging Face Spaces expects port 7860
EXPOSE 7860
# Start server
CMD ["uvicorn", "blackbox_server:app", "--host", "0.0.0.0", "--port", "7860"]