File size: 729 Bytes
931b5b0 06006e3 931b5b0 291dbce |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# 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"]
|