File size: 1,118 Bytes
57358b3
cedee4b
 
57358b3
cedee4b
 
cc797e2
 
cedee4b
 
 
 
 
 
 
 
 
57358b3
cedee4b
 
57358b3
cc797e2
 
 
cedee4b
 
57358b3
2b856e0
cc797e2
cedee4b
 
57358b3
cc797e2
cedee4b
 
cc797e2
cedee4b
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
# ---- ① 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"]