SyFox / Dockerfile
Mr-DS-ML-85's picture
Upload folder using huggingface_hub
c97bd71 verified
Raw History Blame Contribute Delete
1.09 kB
# SyFox giant model — HuggingFace Spaces (Docker SDK)
# Builds the SI-substrate engine from source, then serves the v3 HTTP API
# on the port Spaces expects (7860). No transformer, no NN: decisions come
# from the C++ SI substrate (energy injection -> settle -> readout).
FROM python:3.11-slim AS enginebuild
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential g++ make && rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY engine/ /src/
RUN make build/libsyfox_core.so && strip build/libsyfox_core.so
FROM python:3.11-slim
RUN pip install --no-cache-dir fastapi uvicorn
WORKDIR /app
COPY --from=enginebuild /src/build/libsyfox_core.so /app/build/libsyfox_core.so
COPY server/ /app/server/
COPY inference.py /app/inference.py
COPY model/ /app/model/
COPY datasets/ /app/datasets/
COPY docs/ /app/docs/
ENV PYTHONUNBUFFERED=1
EXPOSE 7860
# script routing: /app/model/giant -> /app/model/giant-latin, giant-bengali, ...
CMD ["python", "server/app.py", "--model", "model/giant", "--lang", "auto", \
"--energy-norm", "--host", "0.0.0.0", "--port", "7860"]