# Use a slim Python base image | |
FROM python:3.10-slim | |
# Set the working directory inside the container | |
WORKDIR /app | |
# Copy all project files to the container | |
COPY . . | |
# Install dependencies | |
RUN pip install --no-cache-dir flask eventlet python-socketio | |
# Expose the port Flask will run on (Hugging Face Spaces expects 7860, but Flask defaults to 5000) | |
EXPOSE 5000 | |
# Command to run the server | |
CMD ["python", "server.py"] |