tictactoe / Dockerfile
ravithejads's picture
Upload 8 files
7bfb4cb verified
raw
history blame
810 Bytes
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application files
COPY . .
# Expose port 7860 for Hugging Face Spaces
EXPOSE 7860
# Create startup script that runs the MCP server (primary) and web UI (secondary)
RUN echo '#!/bin/bash\n\
echo "Starting Tic-Tac-Toe MCP Server on port 7860..."\n\
echo "This is the MCP server for Claude/LeChat integration"\n\
echo "Web UI available at /rooms-ui endpoint"\n\
echo "MCP Tools: create_room, make_move, send_chat, get_room_state, list_rooms"\n\
python mcp_server.py' > start.sh && chmod +x start.sh
# Set required environment variable for Mistral API
ENV MISTRAL_API_KEY=""
CMD ["./start.sh"]