9router / Dockerfile
lnashar's picture
Upload folder using huggingface_hub
5a2ec34 verified
Raw History Blame Contribute Delete
540 Bytes
FROM node:22-bullseye-slim
# Create user with UID 1000 for Hugging Face Spaces security
RUN useradd -m -u 1000 user
WORKDIR /home/user/app
# Install 9router globally via npm
RUN npm install -g 9router
# Setup data directory permissions
RUN mkdir -p /home/user/.9router && chown -R user:user /home/user
USER user
ENV HOME=/home/user
ENV PATH=/home/user/.npm-global/bin:$PATH
ENV PORT=7860
ENV HOSTNAME=0.0.0.0
# Expose default HF Spaces port
EXPOSE 7860
# Start 9router
CMD ["9router", "start", "--port", "7860", "--host", "0.0.0.0"]