# FreeLLMAPI's actual API and dashboard are Node.js/React; use the upstream # release image, with a small Python launcher to configure Hugging Face Spaces. FROM ghcr.io/tashfeenahmed/freellmapi:v0.16.7 USER root # Python launcher + pip keep the Space package Python-friendly and install the # declared requirements.txt. No third-party Python dependencies are currently # needed by app.py. RUN apt-get update \ && apt-get install -y --no-install-recommends python3 python3-pip \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt /app/requirements.txt RUN if grep -qEv '^[[:space:]]*(#.*)?$' /app/requirements.txt; then \ python3 -m pip install --break-system-packages --no-cache-dir -r /app/requirements.txt; \ fi COPY app.py /app/app.py ENV NODE_ENV=production \ PORT=7860 \ FREELLMAPI_DATA_DIR=/data EXPOSE 7860 # Explicit CMD is important: without a command, the inherited setpriv-based # upstream entrypoint can emit "setpriv: No program specified". ENTRYPOINT ["python3", "/app/app.py"] CMD ["node", "server/dist/index.js"]