Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files123456789101112131415161718192021222324252627282930313233# HuggingFace Spaces requires port 7860FROM python:3.11-slim
# Set working directoryWORKDIR /app
# Install system dependenciesRUN apt-get update && apt-get install -y \ git \ && rm -rf /var/lib/apt/lists/*
# Copy requirements first for layer cachingCOPY requirements.txt .
# Install Python dependenciesRUN pip install --no-cache-dir -r requirements.txt
# Copy the full projectCOPY . .
# Create the root mock filesystem if it doesn't exist# (it should be committed to the repo, but this is a safety net)RUN mkdir -p root/network root/db root/api
# HuggingFace Spaces requires the app to listen on port 7860EXPOSE 7860
# Set environment variablesENV PYTHONUNBUFFERED=1ENV PYTHONDONTWRITEBYTECODE=1
# Run the FastAPI app (app.py serves the env via HTTP)CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]DockerfileAdded+33