Hugosmpbots / Dockerfile
TheTapTap800
Fix Dockerfile: use npm install instead of npm ci
0a27f4a
Raw
History Blame Contribute Delete
481 Bytes
FROM node:20-slim
# Create app directory
WORKDIR /app
# Copy package.json
COPY package*.json ./
# Install app dependencies
RUN npm install --omit=dev
# Bundle app source
COPY . .
# Expose the port Hugging Face expects
EXPOSE 7860
# Set environment variables
ENV PORT=7860
ENV NODE_ENV=production
# Hugging Face runs with user ID 1000. Let's make sure our user has ownership of the files.
RUN chown -R 1000:0 /app && chmod -R g+w /app
USER 1000
CMD [ "node", "server.js" ]