Spaces:
Paused
Paused
File size: 537 Bytes
cb0e4f0 7a7f4c5 cb0e4f0 7a7f4c5 cb0e4f0 7a7f4c5 cb0e4f0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Use an official Node.js image
FROM node:20-slim
# The image already has a 'node' user with UID 1000.
# Hugging Face requires UID 1000, so we switch to this existing user.
USER node
ENV HOME=/home/node
WORKDIR $HOME/app
# Copy configuration files with the correct ownership
COPY --chown=node package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application files
COPY --chown=node . .
# Expose the default port for the API gateway
EXPOSE 7860
# Start the Node.js headless server
CMD ["node", "server.js"] |