neudecide / Dockerfile
orlando-woscholski's picture harryjulian's picture
NeuDecide demo
3b75197
Raw History Blame Contribute Delete
763 Bytes
# Docker Space for the demo (deploy_space.py --sdk docker, the default): the
# static files + model served by serve.py. A Docker Space rather than a static
# one because private static Spaces don't authenticate the page's own
# requests (scripts / model files come back 401); a private Docker Space's
# requests go through HF's authenticated proxy.
FROM python:3.12-slim
RUN useradd -m -u 1000 user
USER user
WORKDIR /home/user/app
COPY --chown=user . .
EXPOSE 7860
# --no-isolation: no COOP/COEP. Embedded on huggingface.co the page can't be
# cross-origin isolated anyway, and COEP would only add ways for HF's auth
# redirects to be blocked; the model runs single-threaded.
CMD ["python", "serve.py", "--host", "0.0.0.0", "--port", "7860", "--no-isolation"]