MCPServer / Dockerfile
BinaryONe
Basic Changes
291dbce
raw
history blame contribute delete
729 Bytes
# Use an official Python 3.11 (or a future version if released) runtime as the base image
FROM python:3.11-slim
# Set environment variables to avoid Python writing .pyc files
# and to ensure that output is sent straight to the terminal
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory to /app
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt /app/
# Install the dependencies
RUN pip install --no-cache-dir -r /app/requirements.txt
# Copy the entire project into the container
COPY . /app/
# Expose the server port (7860)
EXPOSE 7860
# Run the FastMCP server using uvicorn (with FastAPI)
CMD ["uvicorn", "server:mcp", "--host", "0.0.0.0", "--port", "7860"]