galpy / Dockerfile
guohanghui's picture
Update Dockerfile
27525e1 verified
Raw
History Blame Contribute Delete
796 Bytes
FROM python:3.10
# Install build dependencies as root
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
g++ \
gfortran \
libgsl-dev \
&& rm -rf /var/lib/apt/lists/*
# Create user and upgrade pip
RUN useradd -m -u 1000 user
RUN python -m pip install --upgrade pip
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy and install requirements first
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --user -r requirements.txt
# Copy all source code
COPY --chown=user . /app
# Build and install galpy from source
WORKDIR /app/galpy/source
RUN pip install --no-cache-dir --user -e .
WORKDIR /app
ENV MCP_TRANSPORT=http
ENV MCP_PORT=7860
EXPOSE 7860
CMD ["python", "galpy/mcp_output/start_mcp.py"]