Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -13
Dockerfile
CHANGED
|
@@ -1,14 +1,11 @@
|
|
| 1 |
# ---- ① First pull a stage containing uv/uvx separately -------------------
|
| 2 |
FROM ghcr.io/astral-sh/uv:latest AS uvstage
|
| 3 |
-
# It already contains /uv /uvx two ELF executable files
|
| 4 |
|
| 5 |
# ---- ② Main build stage: consistent with your current node:20-slim solution ----
|
| 6 |
FROM node:20-slim
|
| 7 |
|
| 8 |
-
# System tools
|
| 9 |
-
RUN apt-get update && apt-get install -yqq --no-install-recommends
|
| 10 |
-
git python3 python3-pip coreutils socat \
|
| 11 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
# Hugging Face Hub CLI
|
| 14 |
RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
|
|
@@ -20,23 +17,21 @@ ENV PORT=7860
|
|
| 20 |
|
| 21 |
# ----------- ③ Copy the actual uv / uvx binaries ---------------
|
| 22 |
COPY --from=uvstage /uv /uvx /usr/local/bin/
|
| 23 |
-
# Now `uv`, `uvx` are both native binaries, can be used directly
|
| 24 |
|
| 25 |
# ----------- Keep the following consistent with your current setup -----------------------
|
| 26 |
-
ENV PNPM_HOME=/usr/local/share/pnpm
|
| 27 |
-
ENV PATH=$PNPM_HOME:$PATH
|
| 28 |
-
WORKDIR /app
|
| 29 |
RUN git config --global --add safe.directory /app
|
| 30 |
|
| 31 |
# Clone, install, build mcphub
|
| 32 |
RUN git clone https://github.com/parasshah10/mcphub.git .
|
| 33 |
-
|
| 34 |
-
RUN pnpm install
|
| 35 |
RUN npm run build
|
| 36 |
|
| 37 |
# Startup script
|
| 38 |
-
COPY start.sh /app/start.sh
|
| 39 |
RUN chmod +x /app/start.sh
|
| 40 |
|
| 41 |
-
EXPOSE 7860
|
| 42 |
CMD ["/app/start.sh"]
|
|
|
|
| 1 |
# ---- ① First pull a stage containing uv/uvx separately -------------------
|
| 2 |
FROM ghcr.io/astral-sh/uv:latest AS uvstage
|
|
|
|
| 3 |
|
| 4 |
# ---- ② Main build stage: consistent with your current node:20-slim solution ----
|
| 5 |
FROM node:20-slim
|
| 6 |
|
| 7 |
+
# System tools - ADDED CURL HERE!
|
| 8 |
+
RUN apt-get update && apt-get install -yqq --no-install-recommends git python3 python3-pip coreutils socat curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Hugging Face Hub CLI
|
| 11 |
RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
|
|
|
|
| 17 |
|
| 18 |
# ----------- ③ Copy the actual uv / uvx binaries ---------------
|
| 19 |
COPY --from=uvstage /uv /uvx /usr/local/bin/
|
|
|
|
| 20 |
|
| 21 |
# ----------- Keep the following consistent with your current setup -----------------------
|
| 22 |
+
ENV PNPM_HOME=/usr/local/share/pnpm
|
| 23 |
+
ENV PATH=$PNPM_HOME:$PATH
|
| 24 |
+
WORKDIR /app
|
| 25 |
RUN git config --global --add safe.directory /app
|
| 26 |
|
| 27 |
# Clone, install, build mcphub
|
| 28 |
RUN git clone https://github.com/parasshah10/mcphub.git .
|
| 29 |
+
RUN pnpm install
|
|
|
|
| 30 |
RUN npm run build
|
| 31 |
|
| 32 |
# Startup script
|
| 33 |
+
COPY start.sh /app/start.sh
|
| 34 |
RUN chmod +x /app/start.sh
|
| 35 |
|
| 36 |
+
EXPOSE 7860
|
| 37 |
CMD ["/app/start.sh"]
|