Spaces:
Sleeping
Sleeping
File size: 796 Bytes
fb1744f 27525e1 fb1744f 27525e1 fb1744f 27525e1 fb1744f 27525e1 fb1744f 27525e1 fb1744f | 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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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"]
|