monte-carlo-sim / Dockerfile
surfiniaburger's picture
Setup Monte Carlo MCP Server with Git LFS
215dd01
raw
history blame contribute delete
862 Bytes
# Use the official Python image
FROM python:3.10-slim
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
# Install requirements
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Expose port 7860
EXPOSE 7860
# Set environment variables
ENV PORT=7860
ENV PYTHONUNBUFFERED=1
# Run the application
# We run main.py which uses FastMCP.
# We need to make sure it listens on 0.0.0.0 and the correct port.
# The main.py reads PORT env var.
CMD ["python", "mcp_server/main.py"]