Spaces:
Paused
Paused
File size: 1,065 Bytes
713bbff | 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 41 42 43 44 45 46 | FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Base deps
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl git bash jq \
python3 python3-pip python3-venv \
build-essential pkg-config \
supervisor \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# --- Node 20 LTS (important) ---
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get update && apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# sanity prints (helps logs)
RUN node -v && npm -v && python3 -V
# Non-root user
RUN useradd -m -u 1000 appuser
USER appuser
WORKDIR /home/appuser/app
ENV PATH="/home/appuser/.local/bin:${PATH}"
# Python deps
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Node deps
COPY package.json .
RUN npm install --omit=dev
# App files
COPY server.py .
COPY mcp.js .
COPY supervisord.conf .
COPY ui.html .
EXPOSE 7860
CMD ["supervisord", "-c", "/home/appuser/app/supervisord.conf"] |