Spaces:
Running
Running
| # ---- ① First pull a stage containing uv/uvx separately ------------------- | |
| FROM ghcr.io/astral-sh/uv:latest AS uvstage | |
| # ---- ② Main build stage: consistent with your current node:20-slim solution ---- | |
| FROM node:20-slim | |
| # System tools - ADDED CURL HERE! | |
| RUN apt-get update && apt-get install -yqq --no-install-recommends git python3 python3-pip coreutils socat curl && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face Hub CLI | |
| RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages | |
| # pnpm | |
| RUN npm install -g pnpm | |
| ENV PORT=7860 | |
| # ----------- ③ Copy the actual uv / uvx binaries --------------- | |
| COPY --from=uvstage /uv /uvx /usr/local/bin/ | |
| # ----------- Keep the following consistent with your current setup ----------------------- | |
| ENV PNPM_HOME=/usr/local/share/pnpm | |
| ENV PATH=$PNPM_HOME:$PATH | |
| WORKDIR /app | |
| RUN git config --global --add safe.directory /app | |
| # Clone, install, build mcphub | |
| RUN git clone https://github.com/parasshah10/mcphub.git . | |
| RUN pnpm install | |
| RUN npm run build | |
| # Startup script | |
| COPY start.sh /app/start.sh | |
| RUN chmod +x /app/start.sh | |
| EXPOSE 7860 | |
| CMD ["/app/start.sh"] |